Skip to content

Commit

Permalink
Fix canonical URL when setting either port of host from the CLI (faus…
Browse files Browse the repository at this point in the history
…t-streaming#196)

* Fix canonical URL when setting either port of host from the CLI

* Fix canonical URL (reformatted)

Co-authored-by: Ran Katzir <ran.katzir@valerann.com>
Co-authored-by: Taybin Rutkin <taybin@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 21, 2021
1 parent 3959268 commit 808312b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions faust/cli/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ def _init_worker_options(
self.app.conf.web_host = web_host
if web_transport is not None:
self.app.conf.web_transport = web_transport
if web_port is not None or web_host is not None:
self.app.conf.canonical_url = (
f"http://{self.app.conf.web_host}:{self.app.conf.web_port}"
)

@property
def _Worker(self) -> Type[Worker]:
Expand Down

0 comments on commit 808312b

Please sign in to comment.