Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print valid URL when --web-host is not specified #1496

Merged
merged 2 commits into from
Jul 30, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion locust/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,16 @@ def timelimit_stop():
if not options.headless and not options.worker:
# spawn web greenlet
protocol = "https" if options.tls_cert and options.tls_key else "http"
logger.info("Starting web interface at %s://%s:%s" % (protocol, options.web_host, options.web_port))
try:
if options.web_host == "*":
# special check for "*" so that we're consistent with --master-bind-host
web_host = ''
else:
web_host = options.web_host
if web_host:
logger.info("Starting web interface at %s://%s:%s" % (protocol, web_host, options.web_port))
else:
logger.info("Starting web interface at %s://0.0.0.0:%s (accepting connections from all network interfaces)" % (protocol, options.web_port))
web_ui = environment.create_web_ui(
host=web_host,
port=options.web_port,
Expand Down