diff options
| author | Alecs King <alecsk@gmail.com> | 2025-01-10 18:13:46 +0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-01-10 15:27:52 -0800 |
| commit | 76baf97fa13c4109c335180b121140c8ba1bf97b (patch) | |
| tree | dafab3778479b105d8f9a7f480bc163a2909c870 | |
| parent | Git 2.48 (diff) | |
| download | git-76baf97fa13c4109c335180b121140c8ba1bf97b.tar.gz git-76baf97fa13c4109c335180b121140c8ba1bf97b.zip | |
instaweb: fix ip binding for the python http.server
`git instaweb -d python` should bind the server to 0.0.0.0, while
`git instaweb -d python -l` should bind the server to 127.0.0.1.
The code had them backwards by mistake since 2eb14bb2d4
(git-instaweb: add Python builtin http.server support, 2019-01-28).
Signed-off-by: Alecs King <alecsk@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
| -rwxr-xr-x | git-instaweb.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git-instaweb.sh b/git-instaweb.sh index 5ad50160bb..7b44f70789 100755 --- a/git-instaweb.sh +++ b/git-instaweb.sh @@ -694,9 +694,9 @@ class GitWebRequestHandler(CGIHTTPRequestHandler): return result -bind = "127.0.0.1" +bind = "0.0.0.0" if "$local" == "true": - bind = "0.0.0.0" + bind = "127.0.0.1" # Set our http root directory # This is a work around for a missing directory argument in older Python versions |
