Class CrossOriginResourcePolicyHeaderWriter
- java.lang.Object
-
- org.springframework.security.web.header.writers.CrossOriginResourcePolicyHeaderWriter
-
- All Implemented Interfaces:
HeaderWriter
public final class CrossOriginResourcePolicyHeaderWriter extends java.lang.Object implements HeaderWriter
Inserts Cross-Origin-Resource-Policy header- Since:
- 5.7
- See Also:
- Cross-Origin-Resource-Policy
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CrossOriginResourcePolicyHeaderWriter.CrossOriginResourcePolicy
-
Constructor Summary
Constructors Constructor Description CrossOriginResourcePolicyHeaderWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
setPolicy(CrossOriginResourcePolicyHeaderWriter.CrossOriginResourcePolicy resourcePolicy)
Sets theCrossOriginResourcePolicyHeaderWriter.CrossOriginResourcePolicy
value to be used in theCross-Origin-Resource-Policy
headervoid
writeHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Create aHeader
instance.
-
-
-
Method Detail
-
setPolicy
public void setPolicy(CrossOriginResourcePolicyHeaderWriter.CrossOriginResourcePolicy resourcePolicy)
Sets theCrossOriginResourcePolicyHeaderWriter.CrossOriginResourcePolicy
value to be used in theCross-Origin-Resource-Policy
header- Parameters:
resourcePolicy
- theCrossOriginResourcePolicyHeaderWriter.CrossOriginResourcePolicy
to use
-
writeHeaders
public void writeHeaders(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Description copied from interface:HeaderWriter
Create aHeader
instance.- Specified by:
writeHeaders
in interfaceHeaderWriter
- Parameters:
request
- the requestresponse
- the response
-
-