name = "codelook-proxy"
main = "worker.js"
compatibility_date = "2024-01-01"

# 账户 ID（运行 wrangler whoami 获取）
# account_id = "your-account-id"

# 路由配置
# route = "proxy.example.com/*"

# 自定义域名（可选）
# routes = [
#   { pattern = "proxy.example.com/*", custom_domain = true }
# ]

# 环境变量
[vars]
# PROXY_AUTH_TOKEN = "pst_YOUR_SECRET_TOKEN"

# KV 命名空间（用于速率限制）
# [[kv_namespaces]]
# binding = "RATE_LIMIT_KV"
# id = "your-kv-namespace-id"

# Durable Objects（用于更高级的速率限制）
# [[durable_objects.bindings]]
# name = "RATE_LIMITER"
# class_name = "RateLimiter"

# 开发环境配置
[env.development]
name = "codelook-proxy-dev"
vars = { PROXY_AUTH_TOKEN = "pst_dev_token" }

# 生产环境配置
[env.production]
name = "codelook-proxy-prod"
# vars = { PROXY_AUTH_TOKEN = "pst_production_token" }

# 构建配置
[build]
command = ""
# 如果使用 TypeScript，可以设置构建命令
# command = "npm run build"

# 兼容性标志
compatibility_flags = []

# Workers 付费计划功能
# [limits]
# cpu_ms = 50  # 默认免费版是 10ms，付费版是 50ms