title: JSF "faces-redirect=true" redirects from https:// to http:// URL due to Apache ProxyPass
body: <p>As I have an Apache Webserver which does ProxyPass to the Glassfish server, the latter does not know that the customers are talking "https".</p>
  
  <p>Thus when using things like </p>
  
  <pre><code>return "shop.xhtml?faces-redirect=true";
  </code></pre>
  
  <p>the generated HTTP Location: header contains a "http://" URL.</p>
  
  <p>I've read <a href="https://stackoverflow.com/questions/20905128/jsf-redirects-from-https-to-http">JSF redirects from HTTPS to HTTP</a> but found this solution not very elegant. Is there a way to tell Glassfish that this or all incoming requests are https so that I don't have to fiddle with the generated Navigation rules?</p>