Search code examples
grailsspring-securitygrails-controller

redirect http to https in grails


I have a follow up question about redirecting grails apps from http to https. another user showed me that, the config file, i can do something like this:

    grails.plugins.springsecurity.secureChannel.definition = [
        '/**':         'REQUIRES_SECURE_CHANNEL',]

right now, this will cause the user to see a page that says:

Unable to connect Firefox can't establish a connection to the server at localhost:8443.

Is this what it should be doing? if so, how do i have my grails app redirect to https?

thanks! jason


Solution

  • Grails doesn't run over HTTPS by default. You'll need to execute run-app with -https option.