java.lang.IllegalArgumentException:
When allowCredentials is true, allowedOrigins cannot contain the special value "*" since that cannot be set on the "Access-Control-Allow-Origin" response header. To allow credentials to a set of origins, list them explicitly or consider using "allowedOriginPatterns" instead.
스프링 부트에서 CORS 설정 시 `.allowCredentials(true)` 와 `allowedOrigins("*")` 를 동시에 사용할 수 없도록 업데이트 되었음.
해결
`allowedOrigins("*")` 를 `allowedOriginPatterns("*")` 로 바꿈.
'Dev > Spring' 카테고리의 다른 글
[Spring Boot] Heroku 서버 배포하기 (0) | 2022.05.18 |
---|---|
[Spring boot] JPA 카멜 표기법으로 이름 설정하기 (0) | 2022.04.08 |
[Spring boot] 404 Not Found 에러 해결 - 경로 (0) | 2022.04.08 |
[Spring] Maven이란? (0) | 2022.02.08 |
[Back-end] JDBC Programming (0) | 2022.01.22 |