File tree Expand file tree Collapse file tree
demo/webapp-vaadin/src/main/java/software/xdev/sse/demo/security Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ protected SecurityFilterChain mainSecurityFilterChain(
5252 ))))
5353 // Permission-Policy removed as it's not supported by browsers (besides Chrome)
5454 // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy#browser_compatibility
55- .headers (c -> hstsApplier .apply (c )
55+ .headers (h -> hstsApplier .apply (h )
5656 .contentSecurityPolicy (p -> p .policyDirectives (cspGenerator .buildCSP ()))
5757 // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options
5858 .contentTypeOptions (Customizer .withDefaults ())
Original file line number Diff line number Diff line change @@ -27,10 +27,12 @@ public class MainWebSecurity
2727 final OAuth2RefreshFilter oAuth2RefreshFilter ,
2828 final CSPGenerator cspGenerator ,
2929 final CookieBasedRememberRedirectOAuth2LoginProvider rememberLoginProvider ,
30- final OAuth2LoginUrlStoreAdapter oAuth2LoginUrlStoreAdapter ) throws Exception
30+ final OAuth2LoginUrlStoreAdapter oAuth2LoginUrlStoreAdapter ,
31+ final HstsApplier hstsApplier )
32+ throws Exception
3133 {
3234 http
33- .headers(c - > c
35+ .headers(h - > hstsApplier . apply(h)
3436 .contentSecurityPolicy(p - > p. policyDirectives(cspGenerator. buildCSP()))
3537 .contentTypeOptions(Customizer . withDefaults())
3638 .referrerPolicy(p - > p. policy(ReferrerPolicyHeaderWriter . ReferrerPolicy . SAME_ORIGIN )))
You can’t perform that action at this time.
0 commit comments