kaxil commented on PR #70797:
URL: https://github.com/apache/airflow/pull/70797#issuecomment-5942826726

   Closing this. It fixes the setup the tests model (`SCRIPT_NAME="/auth"`, 
which is what you get when `base_url` has no path) but not the one in #70389. 
With `base_url=https://example.com/myns/myrelease`, the API server sets 
`root_path` from it, so the WSGI mount already arrives with 
`SCRIPT_NAME=/myns/myrelease/auth`, and appending that to the forwarded prefix 
doubles the subpath. I reproduced the stack (`root_path` app, `/auth` sub-app, 
`WSGIMiddleware`, then `_StashMountPrefix`/`ProxyFix`/`_RestoreMountPrefix`, on 
starlette 1.7.0 and fastapi 0.136.3) with `X-Forwarded-Prefix: /myns/myrelease`:
   
   | | generated "Add" link |
   |---|---|
   | main | `/myns/myrelease/roles/add` |
   | this PR | `/myns/myrelease/myns/myrelease/auth/roles/add` |
   | expected | `/myns/myrelease/auth/roles/add` |


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to