Skip to content

Commit 76baf97

Browse files
intgitster
authored andcommitted
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 2eb14bb (git-instaweb: add Python builtin http.server support, 2019-01-28). Signed-off-by: Alecs King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fbe8d30 commit 76baf97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-instaweb.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,9 @@ class GitWebRequestHandler(CGIHTTPRequestHandler):
694694
return result
695695
696696
697-
bind = "127.0.0.1"
697+
bind = "0.0.0.0"
698698
if "$local" == "true":
699-
bind = "0.0.0.0"
699+
bind = "127.0.0.1"
700700
701701
# Set our http root directory
702702
# This is a work around for a missing directory argument in older Python versions

0 commit comments

Comments
 (0)