From c30fccb7a1a3eea73edd83f2dbb8e0aee5410c1c Mon Sep 17 00:00:00 2001 From: Derick Phan Date: Tue, 24 Mar 2026 20:45:14 -0700 Subject: [PATCH] Bind to 0.0.0.0 and use dynamic Host header for bookmarklet Makes the server accessible from other devices on the network instead of only localhost. The bookmarklet now uses the Host header from the request so it works regardless of how the server is accessed. Co-Authored-By: Claude Opus 4.6 --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index f6f85d1..dc83ae4 100644 --- a/app.py +++ b/app.py @@ -505,7 +505,7 @@ class Handler(BaseHTTPRequestHandler): f"" f"

bookmarklet

" f"

Drag this link to your bookmarks bar. Click it on any page to index it instantly.

" - f'

+ save to {esc(name)}

' + f'

r.text()).then(t=>alert(t)).catch(()=>alert(\'tinyweb not running\')))">+ save to {esc(name)}

' f"

{msg}

" f'back' ) @@ -520,5 +520,5 @@ class Handler(BaseHTTPRequestHandler): if __name__ == "__main__": init_db() - print("running on http://localhost:5001") - HTTPServer(("localhost", 5001), Handler).serve_forever() + print("running on http://0.0.0.0:5001") + HTTPServer(("0.0.0.0", 5001), Handler).serve_forever()