FETCH를 통해 데이터를 전달할 때 mode라는 것을 알게되었다. 모드에 따라 헤더 요청을 보낼 수 있는 데이터가 달라지느 는 것 같다.

 

CORS가 보낼 수 있는 헤더 데이터

  • `Accept`
  • `Accept-Language`
  • `Content-Language`
  • `Content-Type`

NO-CORS

이외에도 Auhorization도 보낼 수 있다.

 

출처

 

https://fetch.spec.whatwg.org/#cors-safelisted-request-header

 

Fetch Standard

 

fetch.spec.whatwg.org

 

+ Recent posts