public class ServerHttpSecurity.HeaderSpec
extends java.lang.Object
ServerHttpSecurity.headers()| Modifier and Type | Class and Description |
|---|---|
class |
ServerHttpSecurity.HeaderSpec.CacheSpec
Configures cache control headers
|
class |
ServerHttpSecurity.HeaderSpec.ContentSecurityPolicySpec
Configures
Content-Security-Policy response header. |
class |
ServerHttpSecurity.HeaderSpec.ContentTypeOptionsSpec
The content type headers
|
class |
ServerHttpSecurity.HeaderSpec.FeaturePolicySpec
Configures
Feature-Policy response header. |
class |
ServerHttpSecurity.HeaderSpec.FrameOptionsSpec
Configures frame options response header
|
class |
ServerHttpSecurity.HeaderSpec.HstsSpec
Configures Strict Transport Security response header
|
class |
ServerHttpSecurity.HeaderSpec.ReferrerPolicySpec
Configures
Referrer-Policy response header. |
class |
ServerHttpSecurity.HeaderSpec.XssProtectionSpec
Configures x-xss-protection response header
|
| Modifier and Type | Method and Description |
|---|---|
ServerHttpSecurity |
and()
Allows method chaining to continue configuring the
ServerHttpSecurity |
ServerHttpSecurity.HeaderSpec.CacheSpec |
cache()
Configures cache control headers
|
ServerHttpSecurity.HeaderSpec |
cache(Customizer<ServerHttpSecurity.HeaderSpec.CacheSpec> cacheCustomizer)
Configures cache control headers
|
protected void |
configure(ServerHttpSecurity http) |
ServerHttpSecurity.HeaderSpec |
contentSecurityPolicy(Customizer<ServerHttpSecurity.HeaderSpec.ContentSecurityPolicySpec> contentSecurityPolicyCustomizer)
Configures
Content-Security-Policy response header. |
ServerHttpSecurity.HeaderSpec.ContentSecurityPolicySpec |
contentSecurityPolicy(java.lang.String policyDirectives)
Configures
Content-Security-Policy response header. |
ServerHttpSecurity.HeaderSpec.ContentTypeOptionsSpec |
contentTypeOptions()
Configures content type response headers
|
ServerHttpSecurity.HeaderSpec |
contentTypeOptions(Customizer<ServerHttpSecurity.HeaderSpec.ContentTypeOptionsSpec> contentTypeOptionsCustomizer)
Configures content type response headers
|
ServerHttpSecurity |
disable()
Disables http response headers
|
ServerHttpSecurity.HeaderSpec.FeaturePolicySpec |
featurePolicy(java.lang.String policyDirectives)
Configures
Feature-Policy response header. |
ServerHttpSecurity.HeaderSpec.FrameOptionsSpec |
frameOptions()
Configures frame options response headers
|
ServerHttpSecurity.HeaderSpec |
frameOptions(Customizer<ServerHttpSecurity.HeaderSpec.FrameOptionsSpec> frameOptionsCustomizer)
Configures frame options response headers
|
ServerHttpSecurity.HeaderSpec.HstsSpec |
hsts()
Configures the Strict Transport Security response headers
|
ServerHttpSecurity.HeaderSpec |
hsts(Customizer<ServerHttpSecurity.HeaderSpec.HstsSpec> hstsCustomizer)
Configures the Strict Transport Security response headers
|
ServerHttpSecurity.HeaderSpec.ReferrerPolicySpec |
referrerPolicy()
Configures
Referrer-Policy response header. |
ServerHttpSecurity.HeaderSpec |
referrerPolicy(Customizer<ServerHttpSecurity.HeaderSpec.ReferrerPolicySpec> referrerPolicyCustomizer)
Configures
Referrer-Policy response header. |
ServerHttpSecurity.HeaderSpec.ReferrerPolicySpec |
referrerPolicy(org.springframework.security.web.server.header.ReferrerPolicyServerHttpHeadersWriter.ReferrerPolicy referrerPolicy)
Configures
Referrer-Policy response header. |
ServerHttpSecurity.HeaderSpec |
writer(org.springframework.security.web.server.header.ServerHttpHeadersWriter serverHttpHeadersWriter)
Configures custom headers writer
|
ServerHttpSecurity.HeaderSpec.XssProtectionSpec |
xssProtection()
Configures x-xss-protection response header.
|
ServerHttpSecurity.HeaderSpec |
xssProtection(Customizer<ServerHttpSecurity.HeaderSpec.XssProtectionSpec> xssProtectionCustomizer)
Configures x-xss-protection response header.
|
public ServerHttpSecurity and()
ServerHttpSecurityServerHttpSecurity to continue configuringpublic ServerHttpSecurity disable()
ServerHttpSecurity to continue configuringpublic ServerHttpSecurity.HeaderSpec.CacheSpec cache()
ServerHttpSecurity.HeaderSpec.CacheSpec to configurepublic ServerHttpSecurity.HeaderSpec cache(Customizer<ServerHttpSecurity.HeaderSpec.CacheSpec> cacheCustomizer)
cacheCustomizer - the Customizer to provide more options for
the ServerHttpSecurity.HeaderSpec.CacheSpecServerHttpSecurity.HeaderSpec to customizepublic ServerHttpSecurity.HeaderSpec.ContentTypeOptionsSpec contentTypeOptions()
ServerHttpSecurity.HeaderSpec.ContentTypeOptionsSpec to configurepublic ServerHttpSecurity.HeaderSpec contentTypeOptions(Customizer<ServerHttpSecurity.HeaderSpec.ContentTypeOptionsSpec> contentTypeOptionsCustomizer)
contentTypeOptionsCustomizer - the Customizer to provide more options for
the ServerHttpSecurity.HeaderSpec.ContentTypeOptionsSpecServerHttpSecurity.HeaderSpec to customizepublic ServerHttpSecurity.HeaderSpec.FrameOptionsSpec frameOptions()
ServerHttpSecurity.HeaderSpec.FrameOptionsSpec to configurepublic ServerHttpSecurity.HeaderSpec frameOptions(Customizer<ServerHttpSecurity.HeaderSpec.FrameOptionsSpec> frameOptionsCustomizer)
frameOptionsCustomizer - the Customizer to provide more options for
the ServerHttpSecurity.HeaderSpec.FrameOptionsSpecServerHttpSecurity.HeaderSpec to customizepublic ServerHttpSecurity.HeaderSpec writer(org.springframework.security.web.server.header.ServerHttpHeadersWriter serverHttpHeadersWriter)
serverHttpHeadersWriter - the ServerHttpHeadersWriter to provide custom headers writerServerHttpSecurity.HeaderSpec to customizepublic ServerHttpSecurity.HeaderSpec.HstsSpec hsts()
ServerHttpSecurity.HeaderSpec.HstsSpec to configurepublic ServerHttpSecurity.HeaderSpec hsts(Customizer<ServerHttpSecurity.HeaderSpec.HstsSpec> hstsCustomizer)
hstsCustomizer - the Customizer to provide more options for
the ServerHttpSecurity.HeaderSpec.HstsSpecServerHttpSecurity.HeaderSpec to customizeprotected void configure(ServerHttpSecurity http)
public ServerHttpSecurity.HeaderSpec.XssProtectionSpec xssProtection()
ServerHttpSecurity.HeaderSpec.XssProtectionSpec to configurepublic ServerHttpSecurity.HeaderSpec xssProtection(Customizer<ServerHttpSecurity.HeaderSpec.XssProtectionSpec> xssProtectionCustomizer)
xssProtectionCustomizer - the Customizer to provide more options for
the ServerHttpSecurity.HeaderSpec.XssProtectionSpecServerHttpSecurity.HeaderSpec to customizepublic ServerHttpSecurity.HeaderSpec.ContentSecurityPolicySpec contentSecurityPolicy(java.lang.String policyDirectives)
Content-Security-Policy response header.policyDirectives - the policy directive(s)ServerHttpSecurity.HeaderSpec.ContentSecurityPolicySpec to configurepublic ServerHttpSecurity.HeaderSpec contentSecurityPolicy(Customizer<ServerHttpSecurity.HeaderSpec.ContentSecurityPolicySpec> contentSecurityPolicyCustomizer)
Content-Security-Policy response header.contentSecurityPolicyCustomizer - the Customizer to provide more options for
the ServerHttpSecurity.HeaderSpec.ContentSecurityPolicySpecServerHttpSecurity.HeaderSpec to customizepublic ServerHttpSecurity.HeaderSpec.FeaturePolicySpec featurePolicy(java.lang.String policyDirectives)
Feature-Policy response header.policyDirectives - the policy directive(s)ServerHttpSecurity.HeaderSpec.FeaturePolicySpec to configurepublic ServerHttpSecurity.HeaderSpec.ReferrerPolicySpec referrerPolicy(org.springframework.security.web.server.header.ReferrerPolicyServerHttpHeadersWriter.ReferrerPolicy referrerPolicy)
Referrer-Policy response header.referrerPolicy - the policy to useServerHttpSecurity.HeaderSpec.ReferrerPolicySpec to configurepublic ServerHttpSecurity.HeaderSpec.ReferrerPolicySpec referrerPolicy()
Referrer-Policy response header.ServerHttpSecurity.HeaderSpec.ReferrerPolicySpec to configurepublic ServerHttpSecurity.HeaderSpec referrerPolicy(Customizer<ServerHttpSecurity.HeaderSpec.ReferrerPolicySpec> referrerPolicyCustomizer)
Referrer-Policy response header.referrerPolicyCustomizer - the Customizer to provide more options for
the ServerHttpSecurity.HeaderSpec.ReferrerPolicySpecServerHttpSecurity.HeaderSpec to customize