Skip to content

Commit

Permalink
🌈 style: 优化
Browse files Browse the repository at this point in the history
kalicyh committed Aug 11, 2024
1 parent a4abfc2 commit 2165dc6
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/utils/config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const BASE_API = import.meta.env.VITE_BASE_API || '/';
export const PUBLIC_PATH = import.meta.env.VITE_PUBLIC_PATH || '/api';
export const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || 'http://127.0.0.1:8000';
export const API_BASE_URL = import.meta.env.VITE_API_BASE_URL || 'http://127.0.0.1:8000';
12 changes: 6 additions & 6 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -8,12 +8,12 @@ export default defineConfig({
base: import.meta.env.VITE_PUBLIC_PATH || '/',
server: {
proxy: {
"/api": {
target: import.meta.env.VITE_API_BASE_URL,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ""),
},
},
'/api': {
target: import.meta.env.VITE_API_BASE_URL,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, '')
}
}
},
plugins: [
vue(),

0 comments on commit 2165dc6

Please sign in to comment.