feat(api): allow X-API-Key and X-Client-IP headers in CORS configuration

This commit is contained in:
2026-02-19 20:26:56 +08:00
parent e77f69c5c4
commit ce0731c2f2
+1 -1
View File
@@ -25,7 +25,7 @@ app.add_middleware(
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
allow_headers=["*", "X-API-Key", "X-Client-IP"],
)
API_KEY = "your-secret-key-here" # 建议从环境变量读取