added middelware
All checks were successful
Build, Push, and Deploy to Nomad / docker-nomad (push) Successful in 31s

This commit is contained in:
2024-12-10 21:49:15 +01:00
parent 0936adae7d
commit 3c8d51c758

2
app.py
View File

@@ -29,7 +29,7 @@ app = FastAPI()
# Mount static files
app.mount("/static", StaticFiles(directory="static"), name="static")
app.add_middleware(ProxyHeadersMiddleware)
app.add_middleware(TrustedHostMiddleware, allowed_hosts=["lifefaq.nomad.i80.dk", "localhost"])
app.add_middleware(TrustedHostMiddleware, allowed_hosts=["lifefaq.nomad.i80.dk", "lifefaq.i80.dk","localhost"])
# Templates directory
templates = Jinja2Templates(directory="templates")