0

I have deployed a grails application on Heroku at jetty runner.

I have purchase a SSL certificate from dnsSimple and successfully configured it considering when I hit the "https://mydomainname.com" I can see the certificate information.

Now I want to force all communication on https.
I have tried the following things but nothing worked so far:
grails - simple App to test spring-security-core secure-channel on Heroku
grails - spring-security-core secure-channel causing redirect loop (on Heroku)
and a lot of other post recommending to use a filter for https but no luck.
Can you help me?

Community
  • 1
  • 1
  • I'm not sure how this would be applied in Grails but here is the way to do it with Play: http://stackoverflow.com/questions/8512887/xforwardedsupport-for-https-play-support-on-heroku-failing – James Ward Apr 13 '12 at 12:50
  • SO needs a downvote option for comments :) – Burt Beckwith Apr 13 '12 at 16:18

2 Answers2

0

See the section "Using the Spring Security Core plugin" in the Heroku plugin docs where it discusses the useHeaderCheckChannelSecurity property: http://grails-plugins.github.com/grails-heroku/docs/manual/guide/2%20Usage.html

Burt Beckwith
  • 75,342
  • 5
  • 143
  • 156
  • Thanks for your reply Burt. I have done every thing what are define in plugin docs and my application is running on heroku successfully. when I enter the domain.com with https prefix in address bar it serve the on https but when i enter domain.com it is not redirecting to https . Can you please tell me how I can force the app to redirect it on https.. – Amit Kumar Pandey Apr 18 '12 at 07:54
  • @Amit did you ever get this to work? I was playing around with this on Amazon Elastic beanstalk ( Tried it on Heroku as well ) and could not get passed the redirect problem. – imrank1 Sep 24 '12 at 20:48
0

This issue seems due to wrong case of “'x-forwarded-proto” header used in spring security core and “X-FORWARDED-PROTO” header used by heroku Load balancer for https based url. Following link worked for me.
Heroku Forum

Sanjay Kharwar
  • 181
  • 1
  • 7