skip to Main Content

Starlette's url_for doesn't create links with https scheme behind Nginx (via uvicorn)

I've tried everything: @Starlette: routes = [ Mount("/static/", StaticFiles(directory=parent+fs+"decoration"+fs+"static"), name="static"), Route(....), Route(....), ] @Uvicorn: --forwarded-allow-ips=domain.com --proxy-headers @url_for: _external=True _scheme="https" @nginx: proxy_set_header Subdomain $subdomain; proxy_set_header Host $http_host; proxy_pass http://localhost:7000/; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme;…

VIEW QUESTION
Back To Top
Search