Class XFrameOptionsServerHttpHeadersWriter
- java.lang.Object
-
- org.springframework.security.web.server.header.XFrameOptionsServerHttpHeadersWriter
-
- All Implemented Interfaces:
ServerHttpHeadersWriter
public class XFrameOptionsServerHttpHeadersWriter extends java.lang.Object implements ServerHttpHeadersWriter
ServerHttpHeadersWriter
implementation for the X-Frame-Options headers.- Since:
- 5.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
XFrameOptionsServerHttpHeadersWriter.Mode
The X-Frame-Options values.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
X_FRAME_OPTIONS
-
Constructor Summary
Constructors Constructor Description XFrameOptionsServerHttpHeadersWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setMode(XFrameOptionsServerHttpHeadersWriter.Mode mode)
Sets the X-Frame-Options mode.reactor.core.publisher.Mono<java.lang.Void>
writeHttpHeaders(org.springframework.web.server.ServerWebExchange exchange)
Write the headers to the response.
-
-
-
Field Detail
-
X_FRAME_OPTIONS
public static final java.lang.String X_FRAME_OPTIONS
- See Also:
- Constant Field Values
-
-
Method Detail
-
writeHttpHeaders
public reactor.core.publisher.Mono<java.lang.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
public void setMode(XFrameOptionsServerHttpHeadersWriter.Mode mode)
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
-
-
-