Class XFrameOptionsServerHttpHeadersWriter
java.lang.Object
org.springframework.security.web.server.header.XFrameOptionsServerHttpHeadersWriter
- All Implemented Interfaces:
ServerHttpHeadersWriter
ServerHttpHeadersWriter
implementation for the X-Frame-Options headers.- Since:
- 5.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The X-Frame-Options values. -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Sets the X-Frame-Options mode.reactor.core.publisher.Mono<Void>
writeHttpHeaders
(org.springframework.web.server.ServerWebExchange exchange) Write the headers to the response.
-
Field Details
-
X_FRAME_OPTIONS
- See Also:
-
-
Constructor Details
-
XFrameOptionsServerHttpHeadersWriter
public XFrameOptionsServerHttpHeadersWriter()
-
-
Method Details
-
writeHttpHeaders
public reactor.core.publisher.Mono<Void> writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange) Description copied from interface:ServerHttpHeadersWriter
Write the headers to the response.- Specified by:
writeHttpHeaders
in interfaceServerHttpHeadersWriter
- Returns:
- A Mono which is returned to the
Supplier
of theReactiveHttpOutputMessage.beforeCommit(Supplier)
.
-
setMode
Sets the X-Frame-Options mode. There is no support for ALLOW-FROM because not all browsers support it. Consider using X-Frame-Options with Content-Security-Policy frame-ancestors.- Parameters:
mode
-
-