mirror of
https://gitlab.com/2-chainz/2chainz.git
synced 2025-08-01 11:11:25 +00:00
Add Proxy Headers
This commit is contained in:
@@ -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"]
|
||||||
|
@@ -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()
|
||||||
|
Reference in New Issue
Block a user