title: Redirection from http to https (Pencilblue Elastic Beanstalk)
body: <p>We're trying to redirect all the hits from <code>http</code> to <code>https</code>. Currently the application is deployed on elastic beanstalk and it's allowing both http and https, but we only want the <code>https</code>.</p>
  
  <p>I've tried adding the <strong>server object</strong> in <code>config.js</code> to make the check </p>
  
  <p><code>pb.config.server.ssl.use_x_forwarded &amp;&amp; req.headers["x-forwarded-proto"] !== "https"</code> </p>
  
  <p>work in <code>pencilblue.js</code>, but it broke the code on localhost as well as live.</p>
  
  <p>Could you please suggest a way to redirect all <code>http</code> hits to <code>https</code>?</p>
  
  <p>Thanks a lot.</p>