diff --git a/aiohttp_pydantic/oas/view.py b/aiohttp_pydantic/oas/view.py index 8523391..699a72c 100644 --- a/aiohttp_pydantic/oas/view.py +++ b/aiohttp_pydantic/oas/view.py @@ -172,6 +172,8 @@ async def oas_ui(request): static_url = request.app.router["static"].url_for(filename="") spec_url = request.app.router["spec"].url_for() + if request.scheme != request.headers.get('x-forwarded-proto', request.scheme): + request = request.clone(scheme=request.headers['x-forwarded-proto']) host = request.url.origin() return Response(