[英]While accessing http in wildfly9, a blank download file is getting downloaded
我通過更改以下配置阻止了wildfly 9.0中的http協議(僅啟用了https)
將connector-ref =“default”更改為connector-ref =“default-ssl”
<subsystem xmlns="urn:jboss:domain:remoting:3.0">
<endpoint worker="default"/>
<http-connector name="http-remoting-connector" connector-ref="default-ssl" security-realm="ApplicationRealm"/>
</subsystem>
評論了http聽眾
<subsystem xmlns="urn:jboss:domain:undertow:2.0">
<buffer-cache name="default"/>
<server name="default-server">
<!-- <http-listener name="default" socket-binding="http" redirect-socket="https"/> -->
<https-listener name="def.....
它工作..我能夠阻止http和啟用https協議訪問。 理想情況下,它應該拒絕http請求。 但是,現在問題是,每當我訪問http:// localhost:8080 / MyWebApp /時 ,它拒絕http請求,但同時,網頁正在下載空白下載文件。 為什么???
謝謝。
您應該將您的http請求重定向到https而不是禁用http:
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" redirect-port="443" />
在處理程序部分添加一個重定向處理程序,其中包括:
<host name="other-host" alias="www.mysite.com, ${prop.value:default-alias}" default-web-module="something.war" disable-console-redirect="true">
<location name="/" handler="welcome-content">
<filter-ref name="redirects" predicate="!secure" />
</location>
<filter-ref name="headers"/>
</host>
</server>
... https:// myserver /'“redirect =”true“/>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.