How to force https on wildfly 8.1 in openshift?

北慕城南 提交于 2019-12-04 18:30:37

Fixed.

Added the following to my web.xml:

<security-constraint>
    <web-resource-collection>
        <web-resource-name>Viewpoint Secure URLs</web-resource-name>
        <url-pattern>/*</url-pattern>
    </web-resource-collection>
    <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>

This results in a redirect to https for every url. But the port is 8443. To use the default port 443 I've adjusted my config/standalone.xml:

In the socket-binding-group change:

<socket-binding name="https" port="${jboss.https.port:8443}"/>

to

<socket-binding name="https" port="${jboss.https.port:443}"/>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!