We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 07a74bd commit e35ad73Copy full SHA for e35ad73
app/__init__.py
@@ -8,6 +8,7 @@
8
from fastapi.middleware.cors import CORSMiddleware
9
from fastapi.responses import JSONResponse
10
from fastapi.routing import APIRoute
11
+from uvicorn.middleware.proxy_headers import ProxyHeadersMiddleware
12
13
from app.utils.logger import get_logger
14
from config import ALLOWED_ORIGINS, DOCS, SUBSCRIPTION_PATH
@@ -77,6 +78,9 @@ async def lifespan(app: FastAPI):
77
78
allow_methods=["*"],
79
allow_headers=["*"],
80
)
81
+
82
+app.add_middleware(ProxyHeadersMiddleware, trusted_hosts="*")
83
84
from app import routers, telegram, jobs # noqa
85
from app.routers import api_router # noqa
86
0 commit comments