Files
skytek_xinliang 32a99350e2 chore: iis setting
2026-08-06 15:15:05 +08:00

20 lines
1.1 KiB
Bash
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 後端 API base URL;留空則使用同網域的相對路徑 /api
#
# 正式站:前端與後端(/service)部署在同一台 IIS 的同一個站台/port,
# 兩者同源,不會有 CORS 問題。設定值見 .env.productionVITE_API_BASE_URL=/service/api),
# pnpm build 會自動套用,這裡不用另外處理。
#
# 本機開發:後端目前沒有開放 CORS,瀏覽器直接跨網域呼叫會被擋下(OPTIONS preflight
# 回 405、回應也沒有 Access-Control-Allow-Origin)。改用下面的 API_PROXY_TARGET
# 讓 dev server 轉發 /api,這裡的 VITE_API_BASE_URL 留空即可,不要直接填後端網址。
#
# 複製這份檔案為 .env.local(已在根目錄 .gitignore 以 *.local 排除,不進版控),
# 填入內網後端位址,例如:
# API_PROXY_TARGET=http://192.168.89.54:9004/service/api
# VITE_API_BASE_URL=
VITE_API_BASE_URL=
# 後端尚未完成前保持 true,改為 false 才會實際發出 API 請求
# 本機串接測試請在 .env.local 覆寫為 false;正式站見 .env.production
VITE_USE_MOCK=true