Loading the catalog…
Loading the catalog…
라우트마다 OPTIONS 핸들러가 있다. cors.ts 가 * 를 쓰지 않고 origin별로 allowlist를 검사하는 이유는 뭐고, OPTIONS 핸들러가 없으면 실제 요청은 어덯게 실패하는지. Access-Control-Allow-Origin 에는 값을 하나만 넣을 수 있다. https://domain.co.kr, https://www.domain.co.kr 처럼 여러 개를 나열하는 문법이 없음. 허용할 출처가 여러 개라면 서버가 요청의 Origin 헤더를 읽고, allowlist에 있을 때 그 값을 그대로 돌려줘야한다. 운영 도메인, www 도메인, Framer 미리보기, localhost:3000 이 모두 필요하다면 getCorsHeaders(origin) 처럼 origin을 인자로 받는 함수가 필요하다. * 는 credentials와 같이 쓸 수 없다. fetch(..., { credentials: 'include' }) 로 쿠키를 보내는 요청에서 응답이 Allow-Origin: * 이면 브라우저가 응답을 거부한다.쿠키기반 인증이 지금 없더라도, 나중에 추가하는 순간 * 로는 동작하지 않는다.
What RADAR observed and classified to build this opportunity. It is what the source published, not a verification that the offer is still active.
CORS preflight와 allowlist. 라우트마다 OPTIONS 핸들러가 있다. cors.ts 가 * 를 쓰지 않고 origin별로 allowlist를 검사하는 이유는 뭐고, OPTIONS 핸들러가 없으면 실제 요청은 어덯게 실패하는지. Access-Control-Allow-Origin 에는 값을 하나만 넣을 수 있다. https://domain.co.kr, https://www.domain.co.kr 처럼 여러 개를 나열하는 문법이 없음. 허용할 출처가 여러 개라면 서버가 요청의 Origin 헤더를 읽고, allowlist에 있을 때 그 값을 그대로 돌려줘야한다. 운영 도메인, www 도메인, Framer 미리보기, localhost:3000 이 모두 필요하다면…
Open sourceOpens an external website. Availability and terms may change.