クラス HeadersConfigurer<H extends HttpSecurityBuilder<H>>

  • 実装されたすべてのインターフェース:
    SecurityConfigurer<DefaultSecurityFilterChain,​H>

    public class HeadersConfigurer<H extends HttpSecurityBuilder<H>>
    extends AbstractHttpConfigurer<HeadersConfigurer<H>,​H>

    Security HTTP ヘッダーをレスポンスに追加します。EnableWebSecurity のデフォルトコンストラクターを使用すると、セキュリティ HTTP ヘッダーがデフォルトでアクティブになります。

    デフォルトのヘッダーは次のとおりです。

     Cache-Control: no-cache, no-store, max-age=0, must-revalidate
     Pragma: no-cache
     Expires: 0
     X-Content-Type-Options: nosniff
     Strict-Transport-Security: max-age=31536000 ; includeSubDomains
     X-Frame-Options: DENY
     X-XSS-Protection: 1; mode=block
     
    導入:
    3.2