0

In Grails, I'm using Spring Security Core plugin and I have 2 questions:

  1. Is there a way to make the browser use HTTPS in specific URLs rather HTTP? I'm using this in Config file, but it's not working: grails.plugin.springsecurity.auth.forceHttps = true

  2. How after login the user will go back to the original requested page, for example, the user is trying to access "securedPage" and this needs to be logged in first to it's redirect to the login page so after login I want the user to go back to that page.

Shashank Agrawal
  • 25,161
  • 11
  • 89
  • 121
Sherif
  • 421
  • 3
  • 15

1 Answers1

0

What about trying this?

grails run-app -https // with HTTPS

You can also try using:

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

or try using this plugin:

https://grails.org/plugin/force-ssl

Neoryder
  • 897
  • 2
  • 13
  • 26
  • Ya , i know this to run the whole application in HTTPS ,what i need to run some specific URLs in HTTPS – Sherif Oct 21 '15 at 17:54
  • Any recommendations ? – Sherif Oct 27 '15 at 20:14
  • I've got two one is this http://stackoverflow.com/questions/7534844/how-to-force-https – Neoryder Oct 30 '15 at 09:49
  • Hi i configured this in the Config file , but when i'm trying to access the URL i defined that requires secure channel i get **this page can't be displayed** , i reviewed https://grails-plugins.github.io/grails-spring-security-core/guide/channelSecurity.html , is there any configuration in need to do ? – Sherif Nov 01 '15 at 00:01
  • you may need to remove the s in plugins – Neoryder Nov 01 '15 at 07:44