« Return to Thread: ACEGI: how to configure all pages with HTTPS but the home page?

Re: ACEGI: how to configure all pages with HTTPS but the home page?

by Slava Schmidt-3 :: Rate this Message:

Reply to Author | View in Thread

Hi Fred,

basically thats what you need to have in your SecurityConfig.groovy;

channelConfig = [
           insecure: [ '/roster' ]
          secure: ['/**', '/' ],
      ]

As for https for logged in and http for access without login, i would do this using two controller actions that renders the same view:

...Controller {

roster = {
// nothing special
}

rosters = {
render view:'roster'
}
}

BR,
Slava

On Jul 3, 2009, at 12:06 PM, Fred Janon wrote:

I don't know if it's possible by configuring ACEGI: basically I want all the pages secured with authentication and HTTPS but I want to access the home page at http://localhost:80/roster and after being forced to log in see the page with HTTPS.

My settings are are the moment:

    httpPort = 80
    httpsPort = 443
    // Need to launch roster with 'grails run-app -https' the app is at 'https:/localhost:8443/roster'
    channelConfig = [secure: ['/**'], insecure: ['/login']]

but I can't get access to my home page at http://localhost/roster. I have to go to https://localhost/roster

Thanks

Fred


 « Return to Thread: ACEGI: how to configure all pages with HTTPS but the home page?