我使用Wildfly 9.0.1,最后使用单点登录来保护我的后端和前端,配置如下:
<subsystem xmlns="urn:jboss:domain:undertow:2.0">
<server name="default-server">
<http-listener name="default" socket-binding="http" redirect-socket="https"/>
<host name="default-host" alias="localhost">
<location name="/" handler="welcome-content"/>
<filter-ref name="server-header"/>
<filter-ref name="x-powered-by-header"/>
<single-sign-on path="/"/>
</host>
</server>
...在我的开发环境中,一切都很好。但是,如果我在生产环境中使用表单登录,在这个环境中,通配符位于apache服务器的后面,客户端只能获得JSESSIONID,而不是JSESSIONIDSSO。
相应的apache配置是:
ProxyPass /user http://localhost:10080/user
ProxyPassReverse /user http://localhost:10080/user
ProxyPass /backend http://localhost:10080/backend
ProxyPassReverse /backend http://localhost:10080/backend有什么问题吗?
发布于 2015-08-25 06:39:37
这种情况可能发生的原因有两个:
和OR
在上述任何一种情况下,浏览器都会接收到Set-Cookie头,只是它会默默地丢弃它。
您可以在Apache中添加以下额外配置来解决这个问题
ProxyPassReverseCookiePath /example.com /
ProxyPassReverseCookieDomain localhost example.com有关更多细节,请参考Apache文档,并检查错误日志以获得有关cookie的警告。
https://stackoverflow.com/questions/32179894
复制相似问题