クラス XXssProtectionServerHttpHeadersWriter
java.lang.ObjectSE
org.springframework.security.web.server.header.XXssProtectionServerHttpHeadersWriter
- 実装されたすべてのインターフェース:
ServerHttpHeadersWriter
public class XXssProtectionServerHttpHeadersWriter
extends ObjectSE
implements ServerHttpHeadersWriter
x-xss-protection ヘッダーを追加します。
- 導入:
- 5.0
ネストされたクラスのサマリー
ネストされたクラスフィールドサマリー
フィールドコンストラクターのサマリー
コンストラクターメソッドのサマリー
修飾子と型メソッド説明void
X-XSS-PROTECTION ヘッダーの値を設定します。reactor.core.publisher.Mono<VoidSE>
writeHttpHeaders
(org.springframework.web.server.ServerWebExchange exchange) ヘッダーをレスポンスに書き込みます。
フィールドの詳細
X_XSS_PROTECTION
- 関連事項:
コンストラクターの詳細
XXssProtectionServerHttpHeadersWriter
public XXssProtectionServerHttpHeadersWriter()新しいインスタンスを作成します
メソッドの詳細
writeHttpHeaders
public reactor.core.publisher.Mono<VoidSE> writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange) インターフェースからコピーされた説明:ServerHttpHeadersWriter
ヘッダーをレスポンスに書き込みます。- 次で指定:
- インターフェース
ServerHttpHeadersWriter
のwriteHttpHeaders
- 戻り値:
ReactiveHttpOutputMessage.beforeCommit(Supplier)
のSupplier
SE に戻される Mono。
setHeaderValue
X-XSS-PROTECTION ヘッダーの値を設定します。デフォルトはXXssProtectionServerHttpHeadersWriter.HeaderValue.DISABLED
XXssProtectionServerHttpHeadersWriter.HeaderValue.DISABLED
の場合、X-XSS-Protection が無効であることを指定します。例:X-XSS-Protection: 0
XXssProtectionServerHttpHeadersWriter.HeaderValue.ENABLED
の場合、値 1 が含まれますが、モードがブロックされているとは指定されません。この場合、コンテンツの修正が試みられます。例:X-XSS-Protection: 1
XXssProtectionServerHttpHeadersWriter.HeaderValue.ENABLED_MODE_BLOCK
の場合、値 1 が含まれ、モードがブロックされていると指定されます。内容は "#" に置き換えられます。例:X-XSS-Protection: 1; mode=block
- パラメーター:
headerValue
- 新しいヘッダー値- 例外:
IllegalArgumentExceptionSE
- headerValue が null の場合- 導入:
- 5.8