api 관련 테스트중 options라는 메소드로 서버에 요청하는 경우를 발견했다.

해당 내용은 같이 보내는 값은 없고 서버 응답또한 204로 받는 값은 해더값뿐이였다.

 

받아온 응답의 해더값을 잘 살펴보면 

Access-Control-Allow-Methods 라는 값이 있는데 

이값에서 받고있는 Method 값을 반환해준다.

Postman에서 요청후 받은 응답의 해더

 

자세한 내용은 아래 문서 참조.

Access-Control-Allow-Methods - HTTP | MDN (mozilla.org)

 

Access-Control-Allow-Methods - HTTP | MDN

The Access-Control-Allow-Methods response header specifies one or more methods allowed when accessing a resource in response to a preflight request.

developer.mozilla.org

+ Recent posts