wildfly Undertow中的HTTPS重定向

时间:2014-09-02 11:23:58

标签: https wildfly undertow

我已经将我当前的网站(从JBOSS7)移植到了wildfly。但是使用wildfly,我不会在firefox&中保留HTTPSession。铬。野生蝇Undertow实现是否有任何问题,或者除了默认配置之外,我是否需要为此进行任何其他配置。

备注:我的上下文是在HTTPS重定向中,以下是我的standalone.xml文件的片段。

     <security-realm name="MyRealm">
            <server-identities>
            <ssl>
                <keystore relative-to="jboss.server.config.dir" path="\.keystore" 
                                                         keystore-password="changeit"/>
            </ssl>
            </server-identities>
        </security-realm>
    </security-realms>

 <subsystem xmlns="urn:jboss:domain:undertow:1.1">
        <buffer-cache name="default"/>
        <server name="default-server">
            <http-listener name="default" socket-binding="http"/>
            <https-listener name="https" socket-binding="https" security-realm="MyRealm"/>
            <host name="default-host" alias="localhost">
                <location name="/" handler="welcome-content"/>
                <filter-ref name="server-header"/>
                <filter-ref name="x-powered-by-header"/>
            </host>
        </server>
        <servlet-container name="default">
            <jsp-config/>
        </servlet-container>
        <handlers>
            <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>
        </handlers>
        <filters>
            <response-header name="server-header" header-name="Server" header-value="WildFly/8"/>
            <response-header name="x-powered-by-header" 
                  header-name="X-Powered-By" header-value="Undertow/1"/>
        </filters>
    </subsystem>

Any help is highly appreciated.

Thanks in advance.
Venkat

1 个答案:

答案 0 :(得分:4)

添加&#34; redirect-socket =&#34; https&#34;&#34;到您的http连接器。