Add single domain gateway routing

This commit is contained in:
2026-07-09 16:03:29 +08:00
parent 664d1acbce
commit 7587da6d18
14 changed files with 133 additions and 29 deletions

View File

@@ -1 +1 @@
VITE_API_BASE_URL=http://127.0.0.1:8100/api
VITE_API_BASE_URL=/api

View File

@@ -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
```
## 默认管理员

View File

@@ -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() {

View File

@@ -2,6 +2,7 @@ import vue from "@vitejs/plugin-vue";
import { defineConfig } from "vite";
export default defineConfig({
base: "/login/",
plugins: [vue()],
build: {
rollupOptions: {