|
26 | 26 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
27 | 27 | http |
28 | 28 | // ... |
29 | | - .headers(headers -> headers |
30 | | - .frameOptions(frameOptions -> frameOptions |
| 29 | + .headers((headers) -> headers |
| 30 | + .frameOptions((frameOptions) -> frameOptions |
31 | 31 | .mode(Mode.SAMEORIGIN) |
32 | 32 | ) |
33 | 33 | ); |
|
67 | 67 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
68 | 68 | http |
69 | 69 | // ... |
70 | | - .headers(headers -> headers.disable()); |
| 70 | + .headers((headers) -> headers.disable()); |
71 | 71 | return http.build(); |
72 | 72 | } |
73 | 73 | ---- |
@@ -112,8 +112,8 @@ Java:: |
112 | 112 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
113 | 113 | http |
114 | 114 | // ... |
115 | | - .headers(headers -> headers |
116 | | - .cache(cache -> cache.disable()) |
| 115 | + .headers((headers) -> headers |
| 116 | + .cache((cache) -> cache.disable()) |
117 | 117 | ); |
118 | 118 | return http.build(); |
119 | 119 | } |
@@ -154,8 +154,8 @@ Java:: |
154 | 154 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
155 | 155 | http |
156 | 156 | // ... |
157 | | - .headers(headers -> headers |
158 | | - .contentTypeOptions(contentTypeOptions -> contentTypeOptions.disable()) |
| 157 | + .headers((headers) -> headers |
| 158 | + .contentTypeOptions((contentTypeOptions) -> contentTypeOptions.disable()) |
159 | 159 | ); |
160 | 160 | return http.build(); |
161 | 161 | } |
@@ -196,8 +196,8 @@ Java:: |
196 | 196 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
197 | 197 | http |
198 | 198 | // ... |
199 | | - .headers(headers -> headers |
200 | | - .hsts(hsts -> hsts |
| 199 | + .headers((headers) -> headers |
| 200 | + .hsts((hsts) -> hsts |
201 | 201 | .includeSubdomains(true) |
202 | 202 | .preload(true) |
203 | 203 | .maxAge(Duration.ofDays(365)) |
@@ -244,8 +244,8 @@ Java:: |
244 | 244 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
245 | 245 | http |
246 | 246 | // ... |
247 | | - .headers(headers -> headers |
248 | | - .frameOptions(frameOptions -> frameOptions |
| 247 | + .headers((headers) -> headers |
| 248 | + .frameOptions((frameOptions) -> frameOptions |
249 | 249 | .mode(SAMEORIGIN) |
250 | 250 | ) |
251 | 251 | ); |
@@ -287,8 +287,8 @@ Java:: |
287 | 287 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
288 | 288 | http |
289 | 289 | // ... |
290 | | - .headers(headers -> headers |
291 | | - .xssProtection(xssProtection -> xssProtection.disable()) |
| 290 | + .headers((headers) -> headers |
| 291 | + .xssProtection((xssProtection) -> xssProtection.disable()) |
292 | 292 | ); |
293 | 293 | return http.build(); |
294 | 294 | } |
@@ -325,8 +325,8 @@ Java:: |
325 | 325 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
326 | 326 | http |
327 | 327 | // ... |
328 | | - .headers(headers -> headers |
329 | | - .xssProtection(xssProtection -> xssProtection.headerValue(XXssProtectionServerHttpHeadersWriter.HeaderValue.ENABLED_MODE_BLOCK)) |
| 328 | + .headers((headers) -> headers |
| 329 | + .xssProtection((xssProtection) -> xssProtection.headerValue(XXssProtectionServerHttpHeadersWriter.HeaderValue.ENABLED_MODE_BLOCK)) |
330 | 330 | ); |
331 | 331 | return http.build(); |
332 | 332 | } |
@@ -376,8 +376,8 @@ Java:: |
376 | 376 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
377 | 377 | http |
378 | 378 | // ... |
379 | | - .headers(headers -> headers |
380 | | - .contentSecurityPolicy(policy -> policy |
| 379 | + .headers((headers) -> headers |
| 380 | + .contentSecurityPolicy((policy) -> policy |
381 | 381 | .policyDirectives("script-src 'self' https://trustedscripts.example.com; object-src https://trustedplugins.example.com; report-uri /csp-report-endpoint/") |
382 | 382 | ) |
383 | 383 | ); |
@@ -416,8 +416,8 @@ Java:: |
416 | 416 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
417 | 417 | http |
418 | 418 | // ... |
419 | | - .headers(headers -> headers |
420 | | - .contentSecurityPolicy(policy -> policy |
| 419 | + .headers((headers) -> headers |
| 420 | + .contentSecurityPolicy((policy) -> policy |
421 | 421 | .policyDirectives("script-src 'self' https://trustedscripts.example.com; object-src https://trustedplugins.example.com; report-uri /csp-report-endpoint/") |
422 | 422 | .reportOnly() |
423 | 423 | ) |
@@ -462,8 +462,8 @@ Java:: |
462 | 462 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
463 | 463 | http |
464 | 464 | // ... |
465 | | - .headers(headers -> headers |
466 | | - .referrerPolicy(referrer -> referrer |
| 465 | + .headers((headers) -> headers |
| 466 | + .referrerPolicy((referrer) -> referrer |
467 | 467 | .policy(ReferrerPolicy.SAME_ORIGIN) |
468 | 468 | ) |
469 | 469 | ); |
@@ -515,7 +515,7 @@ Java:: |
515 | 515 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
516 | 516 | http |
517 | 517 | // ... |
518 | | - .headers(headers -> headers |
| 518 | + .headers((headers) -> headers |
519 | 519 | .featurePolicy("geolocation 'self'") |
520 | 520 | ); |
521 | 521 | return http.build(); |
@@ -564,8 +564,8 @@ Java:: |
564 | 564 | SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { |
565 | 565 | http |
566 | 566 | // ... |
567 | | - .headers(headers -> headers |
568 | | - .permissionsPolicy(permissions -> permissions |
| 567 | + .headers((headers) -> headers |
| 568 | + .permissionsPolicy((permissions) -> permissions |
569 | 569 | .policy("geolocation=(self)") |
570 | 570 | ) |
571 | 571 | ); |
|
0 commit comments