I have a CORS problem. I am using spring boot and vue to make a fullstack web. But I get the CORS error when I make the request from the front with axios to the Spring Security form. I'm sure I have to do something in my Authorization class to make the request, but I don't know.
Here is my code:
@EnableWebSecurity
@Configuration
public class WebAuthorization {
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.formLogin()
.usernameParameter("email")
.passwordParameter("password")
.loginPage("/api/login");
http.logout().logoutUrl("/api/logout").deleteCookies("JSESSIONID");
return http.build();
}
I hope you can make the request from the front with Vue to the form that I have with spring security.