From 740bfc76faca3e8cf77a519d3043a4c58af1b2f4 Mon Sep 17 00:00:00 2001 From: lafay <2021211506@stu.hit.edu.cn> Date: Sat, 4 Apr 2026 00:31:53 +0800 Subject: [PATCH] build(config): update API endpoint to production URL and remove dev proxy Changes the default API base URL from local development server (127.0.0.1:8080) to the production endpoint (bbs.littlelan.cn) and removes the Vite dev server proxy configuration, as the application now connects directly to the production API. --- src/api/client.ts | 2 +- tsconfig.app.json | 1 - vite.config.ts | 9 +-------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/api/client.ts b/src/api/client.ts index d394c15..97eec2c 100644 --- a/src/api/client.ts +++ b/src/api/client.ts @@ -2,7 +2,7 @@ import axios from 'axios' import { useAuthStore } from '@/stores/authStore' const apiClient = axios.create({ - baseURL: import.meta.env.VITE_API_BASE_URL || 'http://127.0.0.1:8080/api/v1', + baseURL: import.meta.env.VITE_API_BASE_URL || 'https://bbs.littlelan.cn/api/v1', timeout: 10000, headers: { 'Content-Type': 'application/json', diff --git a/tsconfig.app.json b/tsconfig.app.json index 0f3ed6a..f9667fd 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -17,7 +17,6 @@ "jsx": "react-jsx", /* Path aliases */ - "baseUrl": ".", "paths": { "@/*": ["./src/*"] }, diff --git a/vite.config.ts b/vite.config.ts index 8c2b2fd..3625d68 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -10,12 +10,5 @@ export default defineConfig({ '@': path.resolve(__dirname, './src'), }, }, - server: { - proxy: { - '/api': { - target: 'http://127.0.0.1:8080', - changeOrigin: true, - }, - }, - }, + server: {}, })