diff --git a/README.md b/README.md index a56f09b..5b888d3 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ An alternative to [FlareSolverr](https://github.com/FlareSolverr/FlareSolverr) a | Environment Variable | Default | Description | | -------------------- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `HOST` | `0.0.0.0` | Host address to bind the server to. Use `0.0.0.0` to bind to all IPv4 interfaces, `::` for all IPv6 interfaces, or `127.0.0.1`/`localhost` for local access only. | | `USE_HEADLESS` | `SeleniumBase default` | Use headless chromium. | | `PROXY` | None | Proxy to use in format: `protocol://username:password@host:port`. [SOCKS5 with authentication is not supported by Chrome](https://stackoverflow.com/questions/75602916/connection-to-private-proxy-socks5-with-chrome-webrequest-onauthrequired-and), see `compose.yaml` file for a workaround | diff --git a/main.py b/main.py index 605c019..fa924bd 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,7 @@ from __future__ import annotations import logging +import os import uvicorn from fastapi import FastAPI @@ -21,4 +22,5 @@ app.include_router(router=router) if __name__ == "__main__": - uvicorn.run(app, host="0.0.0.0", port=8191, log_level=LOG_LEVEL) # noqa: S104 + host = os.getenv("HOST", "0.0.0.0") + uvicorn.run(app, host=host, port=8191, log_level=LOG_LEVEL) # noqa: S104