Compare commits

..

No commits in common. "d638dfe38cc153c038277ee0ddd75a339358b75b" and "0142211c81c70329e1a4fb5819bc2df11d53e382" have entirely different histories.

2 changed files with 1 additions and 11 deletions

View file

@ -1,4 +1,4 @@
PORT = 8000 PORT = 8000
GRAB_SYMLINKS = true GRAB_SYMLINKS = true
SYMLINK_DIR = "symlinks" SYMLINKS_DIR = "symlinks"
STATIC_SHARE_RESTRICTION = true STATIC_SHARE_RESTRICTION = true

View file

@ -56,8 +56,6 @@ class CustomHandler(http.server.SimpleHTTPRequestHandler):
project_id = parts[0] project_id = parts[0]
project_dir = get_project_directory(project_id) project_dir = get_project_directory(project_id)
if not project_dir:
return os.path.join(BASE_DIR, "404.html")
# Check .staticshare restriction # Check .staticshare restriction
if STATIC_SHARE_RESTRICTION: if STATIC_SHARE_RESTRICTION:
staticshare_path = os.path.join(project_dir, ".staticshare") staticshare_path = os.path.join(project_dir, ".staticshare")
@ -90,14 +88,6 @@ class CustomHandler(http.server.SimpleHTTPRequestHandler):
project_dir = get_project_directory(project_id) 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: if STATIC_SHARE_RESTRICTION:
staticshare_path = os.path.join(project_dir, ".staticshare") staticshare_path = os.path.join(project_dir, ".staticshare")
if not os.path.isfile(staticshare_path): if not os.path.isfile(staticshare_path):