【发布时间】:2011-07-20 20:06:42
【问题描述】:
我的 webapp 具有以下安全配置(即 http 通道要求):
<bean id="channelProcessingFilter" class="org.acegisecurity.securechannel.ChannelProcessingFilter">
<property name="channelDecisionManager"><ref bean="channelDecisionManager"/>
<property name="filterInvocationDefinitionSource">
<value>
...
\A/.*.html\Z=REQUIRES_INSECURE_CHANNEL
</value>
</property>
</bean>
所有 *.html URL 都需要 http 访问(不安全的通道)。这解释了为什么我看到 https 请求切换到 http。当我将配置更改为需要 https 访问(安全通道)时,我无法通过 http 访问该页面。
我的问题是:有谁知道是否可以允许 http 或 https 访问?
【问题讨论】:
-
不配置channelProcessingFilter怎么样?或者确保没有规则适用于任何以“.html”结尾的 URl?然后 processingFilter 将忽略这些 URL,并让请求被处理
-
不幸的是,在这种情况下我必须使用过滤器,因为通常需要不安全的通道。不过还是谢谢。
标签: spring-security