fix nginx
All checks were successful
Build and Deploy Backend / build-and-deploy (push) Successful in 1m33s
Build and Deploy Web / build-and-deploy (push) Successful in 52s

This commit is contained in:
zyc 2026-02-12 15:10:08 +08:00
parent bc06725ed1
commit 9ad2ac80bf
4 changed files with 3 additions and 10 deletions

View File

@ -0,0 +1 @@
VITE_API_BASE_URL=http://localhost:8000/api

1
frontend/.env.production Normal file
View File

@ -0,0 +1 @@
VITE_API_BASE_URL=https://airlabs-manage-api.airlabs.art/api

View File

@ -2,15 +2,6 @@ server {
listen 80;
server_name localhost;
# API 代理到后端服务K8s 内部通信)
location /api {
proxy_pass http://airlabs-manage-backend:8000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
root /usr/share/nginx/html;
index index.html index.htm;

View File

@ -3,7 +3,7 @@ import { ElMessage } from 'element-plus'
import router from '../router'
const api = axios.create({
baseURL: '/api',
baseURL: import.meta.env.VITE_API_BASE_URL || '/api',
timeout: 30000,
})