web应用程序响应头复制

jaql4c8m  于 2021-06-27  发布在  Java
关注(0)|答案(0)|浏览(314)

我正在基于安全扫描报告对我的应用程序进行安全增强。我的应用程序是在wildfly中运行的javaeeweb应用程序。它通过一个反向代理服务器apache向用户公开。
我在wildfly中的standalone.xml文件中做了以下更改,以启用严格的传输安全性和httponly属性。

<server name="default-server">
    <http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>
        <https-listener name="https" socket-binding="https" security-realm="ApplicationRealm" enable-http2="true"/>
            <host name="default-host" alias="localhost">
                <location name="/" handler="welcome-content"/>
                <http-invoker security-realm="ApplicationRealm"/>
                <filter-ref name="x-frame-options"/>
                <filter-ref name="x-xss-protection"/>
                <filter-ref name="x-content-type-options"/>
                <filter-ref name="transport-security"/>
             </host>
</server>
<servlet-container name="default">
                <jsp-config x-powered-by="false"/>
                <session-cookie http-only="true" secure="true"/>
                <websockets/>
</servlet-container>

但是,当我转到application页并检查network选项卡中的响应时,会看到重复的属性。

Request Method: GET
Status Code: 200 OK
Referrer Policy: strict-origin-when-cross-origin
Connection: Keep-Alive
Content-Length: 4222
Content-Type: text/html;charset=ISO-8859-1
Date: Fri, 08 Jan 2021 02:36:52 GMT
Keep-Alive: timeout=5, max=99
Server: Apache
SET-COOKIE: JSESSIONID=BOH0IrY-e2q24ks1bbMy9bBzqeDZshm1n1O02G_f; Path=/MyApplication; HttpOnly
SET-COOKIE: JSESSIONID=BOH0IrY-e2q24ks1bbMy9bBzqeDZshm1n1O02G_f.application_uat; path=/MyApplication; secure; HttpOnly
Strict-Transport-Security: max-age=63072000; includeSubDomains
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-XSS-Protection: 1; mode=block

另外,在一个示例中,jsessionid是安全的,而在另一个示例中,jsessionid是不安全的。我没有处理apache服务器的配置。可能是因为apache服务器的某些配置吗?我对这个很陌生,所以很感激你能帮我解决这个问题。
谢谢您。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题