Add single domain gateway routing
This commit is contained in:
@@ -1 +1 @@
|
||||
VITE_API_BASE_URL=http://127.0.0.1:8100/api
|
||||
VITE_API_BASE_URL=/api
|
||||
|
||||
@@ -12,13 +12,13 @@ npm run dev -- --port 5174
|
||||
默认访问地址:
|
||||
|
||||
```text
|
||||
http://127.0.0.1:5174/
|
||||
http://127.0.0.1:8080/login
|
||||
```
|
||||
|
||||
默认后端地址:
|
||||
|
||||
```text
|
||||
http://127.0.0.1:8100/api
|
||||
/api
|
||||
```
|
||||
|
||||
## 默认管理员
|
||||
|
||||
@@ -14,7 +14,7 @@ import type {
|
||||
UserImportResult,
|
||||
} from "../types/api";
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE_URL ?? "http://127.0.0.1:8100/api";
|
||||
const API_BASE = import.meta.env.VITE_API_BASE_URL ?? "/api";
|
||||
const TOKEN_KEY = "ai-kb-admin-token";
|
||||
|
||||
export function getToken() {
|
||||
|
||||
@@ -2,6 +2,7 @@ import vue from "@vitejs/plugin-vue";
|
||||
import { defineConfig } from "vite";
|
||||
|
||||
export default defineConfig({
|
||||
base: "/login/",
|
||||
plugins: [vue()],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
|
||||
@@ -1 +1 @@
|
||||
VITE_API_BASE_URL=http://127.0.0.1:8100/api
|
||||
VITE_API_BASE_URL=/api
|
||||
|
||||
@@ -33,7 +33,11 @@ npm run dev
|
||||
|
||||
默认 API 地址为:
|
||||
|
||||
`http://127.0.0.1:8100/api`
|
||||
`/api`
|
||||
|
||||
统一入口访问地址为:
|
||||
|
||||
`http://127.0.0.1:8080/`
|
||||
|
||||
## 说明
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ApiResponse, CaptchaResult, ChatMessage, ChatSession, LoginResult, UserProfile } from "../types/api";
|
||||
|
||||
const API_BASE = import.meta.env.VITE_API_BASE_URL ?? "http://127.0.0.1:8100/api";
|
||||
const API_BASE = import.meta.env.VITE_API_BASE_URL ?? "/api";
|
||||
const TOKEN_KEY = "ai-kb-user-token";
|
||||
|
||||
export function getToken() {
|
||||
|
||||
Reference in New Issue
Block a user