Skip to content

Commit 6b1bab2

Browse files
committed
Updated docs
1 parent c86796b commit 6b1bab2

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

demo/webapp-vaadin/src/main/java/software/xdev/sse/demo/security/MainWebSecurity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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())

vaadin/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff 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)))

0 commit comments

Comments
 (0)