g4f / config.yaml
hongshi-files's picture
Create config.yaml
59083b0 verified
raw
history blame
453 Bytes
listen: "0.0.0.0:17285"
# 允许任何来源调用(HuggingFace 必须)
cors:
enabled: true
allow_origins: ["*"]
allow_methods: ["GET", "POST", "OPTIONS"]
allow_headers: ["*"]
# 转发规则:main.ts 会向 dynamic-proxy POST:
# { "target": "https://xxx", "payload": {...} }
# 所以我们只需要允许 proxy 的 / 端点
routes:
- route: "/"
upstream: ""
strip_path: false
preserve_host: false
enable_websocket: false