Web version on the site: /app/ from website/static/app, precompressed Brotli/gzip
The site serves precompressed copies next to its files (the program is 19 MB, 6.3 MB in Brotli); the built program goes to website/static/app (ignored by git, taken into the image); the device page's screenshots by the site's own paths. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
dd1f3c6c28
commit
4ccf8099a5
4 changed files with 13 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ class Handler(http.server.SimpleHTTPRequestHandler):
|
|||
|
||||
def translate_path(self, path):
|
||||
path = path.split("?", 1)[0].split("#", 1)[0]
|
||||
for prefix, base in (("/app/", APP), ("/static/", STATIC)):
|
||||
for prefix, base in (("/app/", APP), ("/static/", STATIC), ("/screenshots/", STATIC / "screenshots")):
|
||||
if path.startswith(prefix):
|
||||
target = (base / path[len(prefix):]).resolve()
|
||||
if target == base or base in target.parents:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue