fix: detect x-forwarded-proto
if deployed behind proxy
For static files handling, was set up in "oas_ui()"
This commit is contained in:
parent
5567d73952
commit
6211c71875
@ -172,6 +172,8 @@ async def oas_ui(request):
|
|||||||
|
|
||||||
static_url = request.app.router["static"].url_for(filename="")
|
static_url = request.app.router["static"].url_for(filename="")
|
||||||
spec_url = request.app.router["spec"].url_for()
|
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()
|
host = request.url.origin()
|
||||||
|
|
||||||
return Response(
|
return Response(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user