From 655f53fa5104bae10591fc18712018af5745cfc3 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sun, 26 Apr 2015 15:57:24 +0100 Subject: Allow binding to any address via --bind-ip We don't default to 0.0.0.0 because that would be a security risk. Closes #48. --- git-deps | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/git-deps b/git-deps index d806e4b..b814e88 100755 --- a/git-deps +++ b/git-deps @@ -618,6 +618,9 @@ def parse_args(): parser.add_argument('-s', '--serve', dest='serve', action='store_true', help='Run a web server for visualizing the ' 'dependency graph') + parser.add_argument('-b', '--bind-ip', dest='bindaddr', type=str, + metavar='IP', default='127.0.0.1', + help='IP address for webserver to bind to [%(default)s]') parser.add_argument('-p', '--port', dest='port', type=int, metavar='PORT', default=5000, help='Port number for webserver [%(default)s]') @@ -767,7 +770,7 @@ def serve(options): "insecure!") print("!! Arbitrary code can be executed from browser!") print() - webserver.run(port=options.port, debug=options.debug) + webserver.run(port=options.port, debug=options.debug, host=options.bindaddr) def main(): -- cgit