Skip to content

Commit 3c72d3a

Browse files
Bind the development web server to localhost by default
config/Greynir.conf set host = 0.0.0.0, and the config file overrides the GREYNIR_HOST environment variable (settings.py:183), so there was no way to narrow the binding without editing this file. Running main.py on a host with a public IP therefore exposed the Flask development server, with full access to the production database, on every interface. This only affects the development server: production serves through gunicorn, which takes its bind address from config/gunicorn_config.py, and deploy.sh does not copy config/Greynir.conf to deployments. Anyone who does want to reach the dev server from another machine can either change this value locally or forward a port over SSH. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 5e4f4ae commit 3c72d3a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

config/Greynir.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ debug = true
2626
# Web server settings
2727

2828
# Web host address
29-
host = 0.0.0.0
29+
host = 127.0.0.1
3030
# Web host port is '5000' by default
3131
# port = 5000
3232

0 commit comments

Comments
 (0)