1
0
mirror of https://gitlab.com/2-chainz/2chainz.git synced 2025-06-16 01:46:39 +00:00

Add Proxy Headers

This commit is contained in:
Anson 2025-05-23 15:31:59 -06:00
parent 3a1c7a904c
commit db169159e6
2 changed files with 2 additions and 2 deletions

View File

@ -22,4 +22,4 @@ COPY . /app
RUN --mount=type=cache,target=/root/.cache/uv \ RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --locked --no-dev uv sync --locked --no-dev
CMD ["uv", "run", "fastapi", "run", "src/two_chainz", "--port", "80"] CMD ["uv", "run", "fastapi", "run", "src/two_chainz", "--port", "80", "--proxy-headers"]

View File

@ -10,7 +10,7 @@ from fastapi.middleware.trustedhost import TrustedHostMiddleware
app = FastAPI() app = FastAPI()
app.add_middleware( app.add_middleware(
TrustedHostMiddleware, allowed_hosts=["ansonbiggs.com", "*.ansonbiggs.com"] TrustedHostMiddleware, allowed_hosts=["ansonbiggs.com", "*.ansonbiggs.com", "localhost"]
) )
start_time = time.time() start_time = time.time()