Skip to content

Commit 987bdb3

Browse files
committed
Default server to 127.0.0.1 instead of 0.0.0.0
Bind to localhost by default for security. Use WIDEMEM_HOST env var to override when network access is needed.
1 parent 36b6ae1 commit 987bdb3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

widemem/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,5 @@ def health():
115115
import uvicorn
116116

117117
port = int(os.environ.get("WIDEMEM_PORT", "11435"))
118-
uvicorn.run("widemem.server:app", host="0.0.0.0", port=port)
118+
host = os.environ.get("WIDEMEM_HOST", "127.0.0.1")
119+
uvicorn.run("widemem.server:app", host=host, port=port)

0 commit comments

Comments
 (0)