File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -155,13 +155,11 @@ async def rate_limit_exception_handler(request: Request, exc: Exception) -> Resp
155155# Register the custom exception handler for rate limits
156156app .add_exception_handler (RateLimitExceeded , rate_limit_exception_handler )
157157
158- # Mount static files to serve CSS, JS, and other static assets
159- # Mount static files dynamically
158+
159+ # Mount static files dynamically to serve CSS, JS, and other static assets
160160static_dir = Path (__file__ ).parent / "static"
161- if static_dir .exists ():
162- app .mount ("/static" , StaticFiles (directory = static_dir ), name = "static" )
163- else :
164- print (f"Warning: Static directory '{ static_dir } ' does not exist. Skipping static file mount." )
161+ app .mount ("/static" , StaticFiles (directory = static_dir ), name = "static" )
162+
165163
166164# Set up API analytics middleware if an API key is provided
167165if app_analytics_key := os .getenv ("API_ANALYTICS_KEY" ):
You can’t perform that action at this time.
0 commit comments