Thanks to visit codestin.com
Credit goes to developer.mozilla.org

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

Access-Control-Allow-Methods

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2015년 7월⁩.

Access-Control-Allow-Methods 헤더는 사전 요청에 대한 응답으로 리소스에 접근할 때 허용되는 메서드를 지정합니다.

헤더 타입 응답 헤더
금지된 헤더 이름 no

문법

http
Access-Control-Allow-Methods: <method>, <method>, …
Access-Control-Allow-Methods: *

디렉티브

<method>

허용된 HTTP 요청 메서드의 목록이며 콤마로 구분됩니다.

* (와일드카드)

*는 자격 증명이 없는 요청 (쿠키나 HTTP 인증 정보가 없는 요청)에 대해서만 특수 와일드카드 값으로 취급됩니다. 자격 증명이 있는 요청에서는 특별한 의미를 갖지 않고 단순히 "*"라는 메서드 이름으로 취급됩니다.

예제

http
Access-Control-Allow-Methods: POST, GET, OPTIONS
Access-Control-Allow-Methods: *

명세

Specification
Fetch
# http-access-control-allow-methods

브라우저 호환성

같이 보기