Class XXssProtectionServerHttpHeadersWriter

    • Field Detail

      • X_XSS_PROTECTION

        public static final java.lang.String X_XSS_PROTECTION
        See Also:
        Constant Field Values
    • Constructor Detail

      • XXssProtectionServerHttpHeadersWriter

        public XXssProtectionServerHttpHeadersWriter()
        Creates a new instance
    • 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 interface ServerHttpHeadersWriter
        Returns:
        A Mono which is returned to the Supplier of the ReactiveHttpOutputMessage.beforeCommit(Supplier).
      • setEnabled

        @Deprecated
        public void setEnabled​(boolean enabled)
        Deprecated.
        If true, will contain a value of 1. For example:
         X-XSS-Protection: 1
         
        or if setBlock(boolean) is true
         X-XSS-Protection: 1; mode=block
         
        If false, will explicitly disable specify that X-XSS-Protection is disabled. For example:
         X-XSS-Protection: 0
         
        Parameters:
        enabled - the new value
      • setBlock

        @Deprecated
        public void setBlock​(boolean block)
        Deprecated.
        If false, will not specify the mode as blocked. In this instance, any content will be attempted to be fixed. If true, the content will be replaced with "#".
        Parameters:
        block - the new value