Package com.aquima.web.security.headers
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
Constructors Constructor Description AbstractSecurityHeaderWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
hasHeader(javax.servlet.http.HttpServletResponse response, String headerName)
Checks whether the given HTTP response already has at least one header with the given name.
-
-
-
Method Detail
-
hasHeader
protected final boolean hasHeader(javax.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 checkheaderName
- the name of the HTTP header to check- Returns:
- true if the response has at least one header with the given name, false otherwise.
-
-