本文介绍了如何强制https的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个Grails项目。现在,用户可以使用HTTP或HTTPS访问它。我想要求他们只能通过HTTPS访问它。有任何想法吗?我确实安装了spring安全核心,如果可以的话可以提供帮助。
感谢
jason
解决方案
Spring的核心支持:
grails.plugins.springsecurity.secureChannel.definition = [
'/ path / **':'REQUIRES_SECURE_CHANNEL'
]
I have a grails project. Right now, the user can access it either with HTTP or HTTPS. I would like to require that they can only access it through HTTPS. any ideas? I do have spring security core installed, if that can be of help
thanksjason
解决方案
Spring's core supports that:
grails.plugins.springsecurity.secureChannel.definition = [
'/path/**': 'REQUIRES_SECURE_CHANNEL'
]
这篇关于如何强制https的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!