Class AbstractSecurityHeaderWriter

java.lang.Object
com.aquima.web.security.headers.AbstractSecurityHeaderWriter
All Implemented Interfaces:
org.springframework.security.web.header.HeaderWriter
Direct Known Subclasses:
ClickJackingProtectionHeaderWriter, ContentTypeOptionsHeaderWriter, StrictTransportProtectionHeaderWriter, XssProtectionHeaderWriter

public abstract class AbstractSecurityHeaderWriter extends Object implements org.springframework.security.web.header.HeaderWriter
Base class for security header writers which provides the ability to check whether an HTTP header is already present in the response.
Since:
10.0
Author:
Petru Galanton
  • Constructor Summary Link icon

    Constructors
    Constructor
    Description
     
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    protected final boolean
    hasHeader(jakarta.servlet.http.HttpServletResponse response, String headerName)
    Checks whether the given HTTP response already has at least one header with the given name.

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.security.web.header.HeaderWriter Link icon

    writeHeaders
  • Constructor Details Link icon

    • AbstractSecurityHeaderWriter Link icon

      public AbstractSecurityHeaderWriter()
  • Method Details Link icon

    • hasHeader Link icon

      protected final boolean hasHeader(jakarta.servlet.http.HttpServletResponse response, String headerName)
      Checks whether the given HTTP response already has at least one header with the given name.
      Parameters:
      response - the HTTP response to check
      headerName - the name of the HTTP header to check
      Returns:
      true if the response has at least one header with the given name, false otherwise.