본문 바로가기
오류노트

spring boot에서 PUT 메소드 호출시 cors 오류

by 어컴띵 2021. 2. 26.

allowedMethods("*")를 추가한다.

 registry.addMapping("/**")
 .allowedMethods("*")
 .allowedOrigins("http://localhost:3000");

 

참조 : stackoverflow.com/questions/35315090/spring-boot-enable-global-cors-support-issue-only-get-is-working-post-put-and

 

Spring boot enable Global CORS support issue: only GET is working, POST, PUT and Delete are not working

Update: Now looking back more than a year later, I am giving an update hope that will help someone else. Spring IO recommend using CSRF protection for any request that could be processed by a bro...

stackoverflow.com