title: Login loop with Spring Security requires-channel and Amazon Elastic Load Balancer
body: <p>I'm trying to get my spring security working on a server using Amazon Elastic Load Balancer (ELB). The ELB is configured on port 80 to forward to my app on port 8080 and on port 443 to also forward to 8080.</p>
  
  <pre><code>&lt;security:intercept-url pattern="/login.xhtml"  access="IS_AUTHENTICATED_ANONYMOUSLY" requires-channel="https"  /&gt;
  
  &lt;security:port-mappings&gt;
              &lt;security:port-mapping http="80" https="443" /&gt;
  &lt;/security:port-mappings&gt;
  </code></pre>
  
  <p>Whenever I access this page I get into a login loop. Any idea how to solve this? Not sure if Spring Security is having issues with the fact ELB is forward traffic from https port 443 to my app on port 8080.</p>