Class XXssProtectionHeaderWriter

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setBlock​(boolean block)
      If false, will not specify the mode as blocked.
      void setEnabled​(boolean enabled)
      If true, will contain a value of 1.
      java.lang.String toString()  
      void writeHeaders​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Create a Header instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • XXssProtectionHeaderWriter

        public XXssProtectionHeaderWriter()
        Create a new instance
    • Method Detail

      • writeHeaders

        public void writeHeaders​(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)
        Description copied from interface: HeaderWriter
        Create a Header instance.
        Specified by:
        writeHeaders in interface HeaderWriter
        request - the request
        response - the response
      • setEnabled

        public void setEnabled​(boolean enabled)
        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
        enabled - the new value
      • setBlock

        public void setBlock​(boolean block)
        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 "#".
        block - the new value
      • toString

        public java.lang.String toString()
        toString in class java.lang.Object