JSF redirects from HTTPS to HTTP

前端 未结 2 675
闹比i
闹比i 2021-01-13 17:32

I have my application on a test server being executed exclusively over https. When I navigate without redirecting, it works perfectly:

Example:

2条回答
  •  暗喜
    暗喜 (楼主)
    2021-01-13 17:50

    Another solution is to set

    RequestHeader set X-Forwarded-Proto https
    RequestHeader set X-Forwarded-Port 443
    

    on the VirtualHost in Apache.

    JSF will then know that the redirect should be to a HTTPS connection and no code changes are required.

    I have used this with Apache and Wildfly.

提交回复
热议问题