에러 내용
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.
해결
스프링부트 버전 2.4.0부터 allowedOrigins에 `\*`을 추가할 수 없다.
allowedOrigins는 특정 도메인만 받을 수 있다.
`.allowedOrigins` 대신 `.allowedOriginPatterns`를 사용해야 한다.
allowedOriginPatterns는 `\*`같은 와일드카드를 사용할 수 있다.
'TIL' 카테고리의 다른 글
[자바] Stream API (0) | 2024.05.14 |
---|---|
[스프링] [JPA] Querydsl 방언 사용하기 (0) | 2024.05.12 |
[데이터베이스] [MySQL] 전문 검색(FullText Search) (0) | 2024.05.12 |
[트러블슈팅] More than one row with the given identifier was found (0) | 2024.05.12 |
[자바] Math.floorDiv & Math.floorMod (0) | 2024.05.11 |
[알고리즘] 에라토스테네스의 체 - JAVA (0) | 2024.05.11 |