Monday 25 June 2012

oauth twitter plugin grails problem with production

My production app is deployed via cloudfoundry, so I get a url like myapp.cloudfoundry.com. However, I wanted my main domain, myapp.com to forward to that domain. Everything worked initially until the point where it forwards the user to sign in with twitter. All I got was a blank page. Turned out that I need to set the production environment variables in Datasource.groovy like so:

production {
  ...
grails.serverURL = "http://www.myapp.com/" //needed b/c of spring security and url createlinks
grails.app.context = "/"
  ...
}

No comments:

Post a Comment