Search code examples
jsfprettyfaces

PrettyFaces changes the scheme from Https to Http


I'm using PrettyFaces in my project. We recently started using SSL (Https), however, when calling, for example pretty:main-page in a commandlink the https protocol is modified to http. If I used a normal call without pretty: the protocol is not modified.


Solution

  • The answer of PrettyFaces leader was:

    "AFAIK there are basically two ways to work around this issue:

    You could configure Glassfish to assume the https scheme for the http listeners. AFAIK there is a scheme property on the http listener in the latest Glassfish version. See this issue for details. If you are using a load balances / reverse proxy, you could rewrite the Location header before sending it back to the requesting client. That should be easy but depends on you load balances setup. If you are using mod_proxy, you can use the ProxyPassReverse command to achieve this."

    github.com/ocpsoft/rewrite/issues/257#issuecomment-355737351

    OK!