-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Description
When I added stac-auth-proxy between my reverse proxy (nginx) and stac-fastapi-pgstac, all of my links changed to http instead of https
"links": [
{
"rel": "self",
"type": "application/json",
"title": "This document",
"href": "http://stac-api.example.com/"
},
proxy_proto = request.url.scheme |
I don't know much about python but I think this line of code is override the header X-Forwarded-Proto coming to stac-auth-proxy
request.url.scheme comes from the request that arrived at stac-auth-proxy (Which is TLS terminated), not what Nginx passed
Possible fix
proxy_proto = request.headers.get("X-Forwarded-Proto", request.url.scheme)
alukach
Metadata
Metadata
Assignees
Labels
No labels