fix: update environment configuration for debugging and logging, enhance SQLite FTS5 table management, and improve API base URL handling
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
export function getApiBaseUrl(): string {
|
||||
// Use same-origin requests by default.
|
||||
// In local Vite dev, `vite.config.ts` proxies `/api` to the Go backend.
|
||||
return '';
|
||||
}
|
||||
@@ -2,11 +2,12 @@
|
||||
import axios from "axios";
|
||||
import { generateRandomString } from "./index";
|
||||
import i18n from '@/i18n'
|
||||
import { getApiBaseUrl } from './api-base';
|
||||
|
||||
const t = (key: string) => i18n.global.t(key)
|
||||
|
||||
// API基础URL
|
||||
const BASE_URL = import.meta.env.VITE_IS_DOCKER ? "" : "http://localhost:8080";
|
||||
const BASE_URL = getApiBaseUrl();
|
||||
|
||||
|
||||
// 创建Axios实例
|
||||
|
||||
Reference in New Issue
Block a user