Я разрабатываю одностраничное приложение (vaadin 11 + CAS + Spring)
Эти URL-адреса защищены:
.regexMatchers("/secured.*").authenticated()
Для входа в систему я ввожу "localhost: 8080 / secured"
Я хочу перенаправить URL-адрес «/», чтобы при вызове «localhost: 8080» он перенаправлялся на «/ secure»
. Для этого добавляю:
@GetMapping("/")
public String index() {
return "redirect:secured";
}
Но теперь, когда я вызываю localhost: 8080, я получаю 405 ошибок каждые 5 секунд:
Request URL: http://localhost:8080/?v-r=uidl&v-uiId=0
Request Method: POST
Status Code: 405
Я думаю, что это происходит от движка vaadin ...
Как я могу это сделатьработа?
conf conf:
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf()
.disable()
.authorizeRequests()
.regexMatchers("/secured.*")
.authenticated()
.and()
.authorizeRequests()
.regexMatchers("/")
.permitAll()
.and()
.httpBasic()
.authenticationEntryPoint(authenticationEntryPoint)
.and()
.addFilterBefore(singleSignOutFilter, CasAuthenticationFilter.class)
.addFilterBefore(logoutFilter, LogoutFilter.class);
}