fix: only register debug endpoint when DEBUG=True
The /debug/cors endpoint is now conditionally registered, preventing information leakage about CORS configuration in production. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -89,6 +89,7 @@ async def health_check():
|
|||||||
return {"status": "healthy"}
|
return {"status": "healthy"}
|
||||||
|
|
||||||
|
|
||||||
|
if settings.DEBUG:
|
||||||
@app.get("/debug/cors")
|
@app.get("/debug/cors")
|
||||||
async def debug_cors():
|
async def debug_cors():
|
||||||
"""Debug endpoint to check CORS configuration."""
|
"""Debug endpoint to check CORS configuration."""
|
||||||
|
|||||||
Reference in New Issue
Block a user