File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -113,16 +113,18 @@ def save_preferences():
113113def handle_options (path ):
114114 return '' , 200
115115
116+ # Special route for config.json
117+ @app .route ('/config.json' )
118+ def serve_config ():
119+ return send_from_directory ('config' , 'config.json' )
120+
116121# Serve static files - MUST come last as it's a catch-all
117122@app .route ('/<path:path>' )
118123def serve_static (path ):
119- # Special handling for config.json
120- if path == 'config.json' :
121- return send_from_directory ('config' , 'config.json' )
122124 return send_from_directory ('.' , path )
123125
124126if __name__ == '__main__' :
125127 ensure_config_exists ()
126128 print ("KaraKeep HomeDash Server (Flask) starting..." )
127129 print ("API requests will be proxied to avoid CORS issues" )
128- app .run (host = '0.0.0.0' , port = 8595 , debug = False )
130+ app .run (host = '0.0.0.0' , port = 8595 , debug = True ) # Enable debug for better error messages
You can’t perform that action at this time.
0 commit comments