mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-03 23:06:36 +08:00
migrate 3000
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
WAVELET_FRONTEND_URL=http://localhost:3000
|
||||
|
||||
# 后端 URL
|
||||
WAVELET_BACKEND_URL=http://localhost:8000
|
||||
WAVELET_BACKEND_URL=http://localhost:3000
|
||||
|
||||
# Session Cookie
|
||||
WAVELET_SESSION_COOKIE_NAME=wavelet_session_id
|
||||
|
||||
@@ -68,7 +68,7 @@ export const howToUseSections: PolicySection[] = [
|
||||
<p className="font-semibold text-xs text-muted-foreground">方式一:Authorization Bearer 头</p>
|
||||
<CodeBlock
|
||||
code={`GET /api/v1/user/self HTTP/1.1
|
||||
Host: localhost:8000
|
||||
Host: localhost:3000
|
||||
Authorization: Bearer at_628d022b7a95e26b...`}
|
||||
language="http"
|
||||
/>
|
||||
@@ -77,7 +77,7 @@ Authorization: Bearer at_628d022b7a95e26b...`}
|
||||
<p className="font-semibold text-xs text-muted-foreground">方式二:X-Access-Token 自定义头</p>
|
||||
<CodeBlock
|
||||
code={`GET /api/v1/user/self HTTP/1.1
|
||||
Host: localhost:8000
|
||||
Host: localhost:3000
|
||||
X-Access-Token: at_628d022b7a95e26b...`}
|
||||
language="http"
|
||||
/>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*/
|
||||
export function getApiBaseUrl(): string {
|
||||
if (typeof window === 'undefined') {
|
||||
return process.env.WAVELET_BACKEND_URL || process.env.NEXT_PUBLIC_WAVELET_BACKEND_URL || 'http://localhost:8000';
|
||||
return process.env.WAVELET_BACKEND_URL || process.env.NEXT_PUBLIC_WAVELET_BACKEND_URL || 'http://localhost:3000';
|
||||
}
|
||||
return process.env.NEXT_PUBLIC_WAVELET_BACKEND_URL || '';
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ const nextConfig: NextConfig = {
|
||||
},
|
||||
...(isExport ? { output: 'export' } : {
|
||||
async rewrites() {
|
||||
const backendUrl = process.env.WAVELET_BACKEND_URL || 'http://localhost:8000';
|
||||
const backendUrl = process.env.WAVELET_BACKEND_URL || 'http://localhost:3000';
|
||||
return [
|
||||
// 上传文件静态资源
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user