feat(api): allow X-API-Key and X-Client-IP headers in CORS configuration
This commit is contained in:
+1
-1
@@ -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" # 建议从环境变量读取
|
||||
|
||||
Reference in New Issue
Block a user