@@ -61,25 +61,25 @@ protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
6161 successHandler .setTargetUrlParameter ("redirectTo" );
6262 successHandler .setDefaultTargetUrl (this .adminServer .path ("/" ));
6363
64- http .authorizeHttpRequests ((authorizeRequests ) -> authorizeRequests
64+ http .authorizeHttpRequests ((authorizeRequests ) -> authorizeRequests //
6565 .requestMatchers (new AntPathRequestMatcher (this .adminServer .path ("/assets/**" ))).permitAll () // <1>
6666 .requestMatchers (new AntPathRequestMatcher (this .adminServer .path ("/variables.css" ))).permitAll ()
6767 .requestMatchers (new AntPathRequestMatcher (this .adminServer .path ("/actuator/info" ))).permitAll ()
68- .requestMatchers (new AntPathRequestMatcher (this . adminServer .path ("/actuator/health" ))).permitAll ()
68+ .requestMatchers (new AntPathRequestMatcher (adminServer .path ("/actuator/health" ))).permitAll ()
6969 .requestMatchers (new AntPathRequestMatcher (this .adminServer .path ("/login" ))).permitAll ()
7070 .dispatcherTypeMatchers (DispatcherType .ASYNC ).permitAll () // https://github.com/spring-projects/spring-security/issues/11027
7171 .anyRequest ().authenticated ()) // <2>
72- .formLogin ((formLogin ) -> formLogin .loginPage (this .adminServer .path ("/login" ))
73- .successHandler (successHandler )) // <3>
74- .logout ((logout ) -> logout .logoutUrl (this .adminServer .path ("/logout" )))
75- .httpBasic (Customizer .withDefaults ()) // <4>
76- .csrf ((csrf ) -> csrf .csrfTokenRepository (CookieCsrfTokenRepository .withHttpOnlyFalse ()) // <5>
77- .ignoringRequestMatchers (
78- new AntPathRequestMatcher (this .adminServer .path ("/instances" ), POST .toString ()), // <6>
79- new AntPathRequestMatcher (this .adminServer .path ("/instances/*" ), DELETE .toString ()), // <6>
80- new AntPathRequestMatcher (this .adminServer .path ("/actuator/**" )) // <7>
81- ))
82- .rememberMe ((rememberMe ) -> rememberMe .key (UUID .randomUUID ().toString ()).tokenValiditySeconds (1209600 ));
72+ .formLogin ((formLogin ) -> formLogin .loginPage (this .adminServer .path ("/login" ))
73+ .successHandler (successHandler )) // <3>
74+ .logout ((logout ) -> logout .logoutUrl (this .adminServer .path ("/logout" )))
75+ .httpBasic (Customizer .withDefaults ()) // <4>
76+ .csrf ((csrf ) -> csrf .csrfTokenRepository (CookieCsrfTokenRepository .withHttpOnlyFalse ()) // <5>
77+ .ignoringRequestMatchers (
78+ new AntPathRequestMatcher (this .adminServer .path ("/instances" ), POST .toString ()), // <6>
79+ new AntPathRequestMatcher (this .adminServer .path ("/instances/*" ), DELETE .toString ()), // <6>
80+ new AntPathRequestMatcher (this .adminServer .path ("/actuator/**" )) // <7>
81+ ))
82+ .rememberMe ((rememberMe ) -> rememberMe .key (UUID .randomUUID ().toString ()).tokenValiditySeconds (1209600 ));
8383 return http .build ();
8484
8585 }
0 commit comments