Files
wish-pool/env.template
aken1023 2282eed9a1 增加ip 的白名單
總共7個IP地址,分佈在4個地點:
岡山:1個IP
汐止:2個IP
新竹:2個IP
璟茂:2個IP
2025-08-01 12:59:44 +08:00

65 lines
2.2 KiB
Plaintext
Raw 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.

# 心願星河 - 環境變數配置模板
# 複製此文件為 .env.local 並填入實際值
# ================================
# Supabase 配置 (必需)
# ================================
# 從 Supabase Dashboard → Settings → API 獲取
NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key-here
# ================================
# 應用程式 URL
# ================================
# 開發環境
NEXT_PUBLIC_APP_URL=http://localhost:3000
# 生產環境(部署到 Vercel 後修改)
# NEXT_PUBLIC_APP_URL=https://your-app-name.vercel.app
# ================================
# 管理功能 (可選)
# ================================
# 用於服務器端操作和管理功能
# 從 Supabase Dashboard → Settings → API → Service Role 獲取
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key-here
# ================================
# 分析和監控 (可選)
# ================================
# Google Analytics
# NEXT_PUBLIC_GOOGLE_ANALYTICS=GA_MEASUREMENT_ID
# Vercel Analytics
# NEXT_PUBLIC_VERCEL_ANALYTICS=true
# ================================
# IP 白名單控制 (可選)
# ================================
# 允許訪問的IP地址或IP範圍用逗號分隔
# 支援格式:
# - 單一IP: 192.168.1.100
# - IP範圍: 192.168.1.0/24
# - 多個IP: 192.168.1.100,10.0.0.50,172.16.0.0/16
# 留空表示允許所有IP訪問
ALLOWED_IPS=192.168.1.0/24,10.0.0.0/8,172.16.0.0/12
# 是否啟用IP白名單檢查
# true: 啟用IP檢查不在白名單內的IP將被拒絕
# false: 禁用IP檢查允許所有IP訪問
ENABLE_IP_WHITELIST=true
# ================================
# 開發工具 (僅開發環境)
# ================================
# 啟用詳細日誌
# NEXT_PUBLIC_DEBUG=true
# ================================
# 注意事項
# ================================
# 1. 只有以 NEXT_PUBLIC_ 開頭的變數可以在瀏覽器中訪問
# 2. 不要將 Service Role Key 暴露在客戶端代碼中
# 3. 部署到生產環境時,請更新 NEXT_PUBLIC_APP_URL
# 4. .env.local 文件已被 .gitignore 忽略,不會被提交到 Git
# 5. IP白名單功能僅在服務器端生效客戶端無法繞過此限制