diff --git a/.env.defaults b/.env.defaults index ea98216..661e585 100644 --- a/.env.defaults +++ b/.env.defaults @@ -1,4 +1,4 @@ PORT = 8000 GRAB_SYMLINKS = true -SYMLINK_DIR = "symlinks" +SYMLINKS_DIR = "symlinks" STATIC_SHARE_RESTRICTION = true \ No newline at end of file diff --git a/serve.py b/serve.py index 8ddf373..83f50fe 100644 --- a/serve.py +++ b/serve.py @@ -56,8 +56,6 @@ class CustomHandler(http.server.SimpleHTTPRequestHandler): project_id = parts[0] project_dir = get_project_directory(project_id) - if not project_dir: - return os.path.join(BASE_DIR, "404.html") # Check .staticshare restriction if STATIC_SHARE_RESTRICTION: staticshare_path = os.path.join(project_dir, ".staticshare") @@ -90,14 +88,6 @@ class CustomHandler(http.server.SimpleHTTPRequestHandler): project_dir = get_project_directory(project_id) - if not project_dir: - self.send_response(404) - self.send_header("Content-type", "text/html") - self.end_headers() - with open(os.path.join(BASE_DIR, "404.html"), "rb") as f: - self.wfile.write(f.read()) - return - if STATIC_SHARE_RESTRICTION: staticshare_path = os.path.join(project_dir, ".staticshare") if not os.path.isfile(staticshare_path):