File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 99# Configure CORS origins based on environment
1010# Check for production indicators
1111is_production = (
12- os .getenv ("ENVIRONMENT" ) == "production" or
13- os .getenv ("GAE_APPLICATION" ) or # Google App Engine
14- os .getenv ("GOOGLE_CLOUD_PROJECT" ) or # Google Cloud
15- os .getenv ("K_SERVICE" ) # Google Cloud Run
12+ os .getenv ("ENVIRONMENT" ) == "production"
13+ or os .getenv ("GAE_APPLICATION" ) # Google App Engine
14+ or os .getenv ("GOOGLE_CLOUD_PROJECT" ) # Google Cloud
15+ or os .getenv ("K_SERVICE" ) # Google Cloud Run
1616)
1717
1818if is_production :
4242 allow_headers = ["*" ],
4343)
4444
45+
4546@app .get ("/health" )
4647async def health_check ():
4748 """Health check endpoint that also shows CORS configuration."""
4849 return {
4950 "status" : "healthy" ,
5051 "cors_production_mode" : is_production ,
51- "cors_allowed_origins" : allowed_origins
52+ "cors_allowed_origins" : allowed_origins ,
5253 }
5354
55+
5456app .include_router (query .router , prefix = "/query" , tags = ["Query" ])
5557app .include_router (azure .router , prefix = "/azure" , tags = ["Azure" ])
5658app .include_router (system .router , prefix = "/system" , tags = ["System" ])
You can’t perform that action at this time.
0 commit comments