Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssl redirect not happening #1

Open
jholme opened this issue Mar 30, 2015 · 1 comment
Open

ssl redirect not happening #1

jholme opened this issue Mar 30, 2015 · 1 comment

Comments

@jholme
Copy link

jholme commented Mar 30, 2015

I'm hoping to get some guidance on how to properly configure the grails-force-ssl plugin. I have installed it on my application, but I do not observe the expected behavior. In other words, my requests that originate in https are resolved in http. For example (from firebug):

Request Headers
Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Connection  keep-alive
Cookie  ...
Host    qa-api.iii.com
Referer https://qa-api.myhost.com/settings/socialMediaLink/create
User-Agent  Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0

Response Headers
Connection  keep-alive
Content-Length  0
Date    Sat, 28 Mar 2015 00:42:21 GMT
Location    http://qa-api.myhost.com/settings/socialMediaLink/show/42
Server  nginx/1.0.15

BuildConfig.groovy

plugins {
    ...
    compile ":force-ssl:1.0.0"
}

build.gradle (the war file I am deploying is built by Gradle)

dependencies {
    ...
    compile "org.grails.plugins:force-ssl:1.0.0"
}

Config.groovy (I know this is the default, but I made it explicit just in case that would help - it didn't)

environments {
    production {
        ...
        grails.plugin.forceSSL.enabled = true
    }
}

SocialMediaLinkController

@SSLRequired
@Transactional(readOnly = true)
class SocialMediaLinkController
...

The application is running on Tomcat behind Nginx in an AWS EC2 server. Nginx listens on port 80 for requests originating with the AWS load-balancer, that only listens on 443. Adding or editing a resource occurs successfully, but the redirect to '/index' or '/show' shows an 'unable to connect' error because it's redirecting to http and the load-balancer is only accepting https. It seems like this scenario is exactly what the force-ssl plugin is intended to resolve. What can I do to make this work?

thanks!

@ctoestreich
Copy link
Contributor

@jholme There are some interesting thoughts here that might help out. icescrum/iceScrum#8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants