diff --git a/server.py b/server.py index a128549..9d57149 100644 --- a/server.py +++ b/server.py @@ -551,6 +551,9 @@ class APIHandler(BaseHTTPRequestHandler): path = '/index.html' file_path = os.path.join(DIST_DIR, path.lstrip('/')) if not os.path.isfile(file_path): + # Only fallback to index.html for routes, not for asset files + if path.startswith('/assets/') or '.' in path.split('/')[-1]: + self._respond(404, {'error': 'Not found'}); return file_path = os.path.join(DIST_DIR, 'index.html') try: with open(file_path, 'rb') as f: