Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 01416fc

Browse files
committed
feat: Allow overriding uvicorn listen host with LISTEN_HOST env
1 parent a214a40 commit 01416fc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@ You'll need poetry, or make a virtualenv and pip install the repo.
99
```shell
1010
git clone <repo url> && cd <repo name>
1111
poetry install
12-
poetry run uvicorn tailscale_webfinger:app
12+
poetry run tailscale-webfinger
1313
```
1414

1515
## Environment vars
1616

1717
- KANIDM_DOMAIN - the hostname of your Kanidm server
1818
- CLIENT_ID - the client ID of the Tailscale config on your Kanidm server
19+
- LISTEN_HOST - the host to listen to, defaults to `127.0.0.1`
1920

2021
It'll respond with this if you have `idp.example.com`and `tailscale` respectively:
2122

Diff for: tailscale_webfinger/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
def uvicorn_run():
17-
uvicorn.run("tailscale_webfinger:app")
17+
uvicorn.run("tailscale_webfinger:app", host=os.getenv('LISTEN_HOST', '127.0.0.1'))
1818

1919

2020
@lru_cache()

0 commit comments

Comments
 (0)