You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a Slim application works behind a reverse proxy and generates absolute URLs, it generates them according to the internal web server hostname and port, not the external ones. Even if the base path is statically defined in container configuration, it gets overridden during request processing:
Currently, it's only possible to override this behavior by introducing a middleware which kicks in after App::process() and restores the needed base path.
It would be nice if the App only set the base path if it's not set yet.
The text was updated successfully, but these errors were encountered:
Should this be reopened for Slim 4? From the DX perspective, it looks like a bug while the described approach is more of a workaround, not a recommended solution.
When a Slim application works behind a reverse proxy and generates absolute URLs, it generates them according to the internal web server hostname and port, not the external ones. Even if the base path is statically defined in container configuration, it gets overridden during request processing:
Slim/Slim/App.php
Lines 340 to 342 in 3ab1a15
Currently, it's only possible to override this behavior by introducing a middleware which kicks in after
App::process()
and restores the needed base path.It would be nice if the
App
only set the base path if it's not set yet.The text was updated successfully, but these errors were encountered: