Skip to content

Commit 6f12365

Browse files
committed
bugfil
1 parent 0bcb23a commit 6f12365

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

server.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,18 @@ def save_preferences():
113113
def 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>')
118123
def 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

124126
if __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

0 commit comments

Comments
 (0)