title: Grails Spring Security secureChannel not redirecting https?
body: <p>I currently have an application I am working on that I am using in the cloud (Jelastic). I have added SSL certs to my Cloud environment and  want to be able o now use https on certain pages. I have implemented the below methods of doing this:</p>
  
  <p><strong>Method 1:</strong></p>
  
  <pre><code>grails.plugins.springsecurity.secureChannel.definition = [
     '/login/**':         'REQUIRES_SECURE_CHANNEL'
  ]
  </code></pre>
  
  <p><strong>Method 2:</strong></p>
  
  <pre><code>grails.plugins.springsecurity.secureChannel.definition = [
     '/login/**':         'REQUIRES_SECURE_CHANNEL'
  ]
  
  grails.plugins.springsecurity.secureChannel.useHeaderCheckChannelSecurity = true
  grails.plugins.springsecurity.secureChannel.secureHeaderName = 'X-Forwarded-Proto'
  grails.plugins.springsecurity.secureChannel.secureHeaderValue = 'http'
  grails.plugins.springsecurity.secureChannel.insecureHeaderName = 'X-Forwarded-Proto'
  grails.plugins.springsecurity.secureChannel.insecureHeaderValue = 'https'
  </code></pre>
  
  <p>So for method 1 it partly works as when you go to the index page in HTTP and then try to go to the login page you will be shown an error message saying:</p>
  
  <pre><code>Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
  </code></pre>
  
  <p>Method 2 however does not seem to work at all and when I go to the Login page on HTTP it does not redirect me as I would expect and just seems to work on HTTP which is strange.</p>
  
  <p>This solution is hosted in Jelastic as I mention so not sure is that could be causing some issues, but any help offered would be great.</p>
  
  <p>Thanks in advance</p>