I have the following setup:
HTTPS request -> AWS ALB -> Mapped to HTTP (one of two possible ports) -> Websphere 9.0.5
This works fine, except:
When I go to my url without a trailing slash (e.g. https://url.com/test
instead of https://url.com/test/
), WebSphere serves a 302 redirect to http://url.com:9082/test/
, for example, instead of honouring the original https request and port. This then doesn't load because the internal http port is not accessible externally.
The original url and protocol is captured in X-Forwarded-Proto
and X-Forwarded-Host
headers.
Is there any way to tell WebSphere to do the redirect in the way I'd expect, so the user's browser sees https://url.com/test/
? Or, alternatively, for the application to just work without the trailing slash?