From 647b14e99920c2bfbe84a7a3b5d36b41cfd77797 Mon Sep 17 00:00:00 2001 From: blankie Date: Tue, 24 Mar 2026 20:45:14 -0700 Subject: [PATCH] bound to 0.0.0.0, dynamic Host header 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. --- 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()