Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/368.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 在wildfly9中访问http时,会下载一个空白下载文件_Java_Jboss_Wildfly_Wildfly 8_Wildfly 9 - Fatal编程技术网

Java 在wildfly9中访问http时,会下载一个空白下载文件

Java 在wildfly9中访问http时,会下载一个空白下载文件,java,jboss,wildfly,wildfly-8,wildfly-9,Java,Jboss,Wildfly,Wildfly 8,Wildfly 9,通过更改以下配置,我在wildfly 9.0中阻止了http协议(仅启用https) 将连接器ref=“default”更改为连接器ref=“default ssl” 对http侦听器发表了评论 您应该将http请求重定向到https,而不是禁用http: <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" redirect-port="443" /> 在处理程序部

通过更改以下配置,我在wildfly 9.0中阻止了http协议(仅启用https)

将连接器ref=“default”更改为连接器ref=“default ssl”


对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“/>

您应该将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“/>

无论何时访问http://yoursite,还是访问https://yoursite?Just 确保没有打字错误。您如何确切地知道HTTP请求被拒绝?在子系统xmlns=“urn:jboss:domain:undertow:2.0”下评论HTTP侦听器将不会侦听HTTP请求..right无论您何时访问HTTP://yoursite,或当您访问https://yoursite?Just 确保没有打字错误。您如何确切地知道HTTP请求被拒绝?在子系统xmlns=“urn:jboss:domain:undertow:2.0”下评论HTTP侦听器将不会侦听HTTP请求..对吗