【发布时间】:2013-10-02 16:08:37
【问题描述】:
在 java web 应用程序中,我的目标是只接受 https 请求并拒绝所有 http 请求。
在 spring 安全配置文件中,我在 intercept-url 标记中使用 requires-channel="https" 属性,但是如果用户请求 http,它会自动重定向到 https。
例子:
<intercept-url pattern="/**" access="permitAll" requires-channel="https" />
如果客户端尝试通过 http 访问应用程序,我该如何响应 404 Not Found,结果不会自动重定向到 https?
【问题讨论】:
-
这样对用户来说是不是很不方便?
标签: java spring security http https