TomEE 重定向问题 https 到 http 到 https - Web 应用程序

问题描述 投票:0回答:1

当我使用 https://application.domain.net/ui 访问我的应用程序时,请求以一种奇怪的方式重定向。

日志:

    GET 302 Redirect (cached)   https://application.domain.net/ui
    GET 301 Redirect to: http://application.domain.net/ui/login.do
    GET 200 text/html   https://application.domain.net/ui/login.do

应用服务器:TomEE 1.7.4,启用了 SSL 连接器。 应用:耳朵应用

应用程序稍后会带来登录页面。但是 为什么会发生从 https 到 http 然后再到 https 的重定向

我的 TomEE conf/server.xml 内容以及连接器详细信息:

    <Connector port="8080" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443" xpoweredBy="false" server="Apache TomEE" />

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
           maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
           clientAuth="false" sslProtocol="TLS" xpoweredBy="false"   server="Apache TomEE" />

    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
http https redirect apache-tomee
1个回答
1
投票

可以编程或在 web.xml 中配置,您可以通过在 web.xml 中将传输保证设置为 CONFIDENTIAL 来强制执行 https。

© www.soinside.com 2019 - 2024. All rights reserved.