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 July 2015.

Der HTTP Access-Control-Allow-Methods Antwort-Header gibt an, welche ein oder mehrere HTTP-Anfragemethoden zulässig sind, wenn auf eine Ressource als Antwort auf eine Preflight-Anfrage zugegriffen wird.

Header-Typ Antwort-Header
Verbotener Anfrage-Header Nein

Syntax

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

Direktiven

<method>

Eine kommagetrennte Liste der zulässigen Anfragemethoden. GET, HEAD und POST sind immer erlaubt, unabhängig davon, ob sie in diesem Header angegeben sind, da sie als CORS-gesicherte Methode definiert sind.

* (Wildcard)

Alle HTTP-Methoden. Diese Bedeutung hat es nur für Anfragen ohne Anmeldeinformationen (Anfragen ohne HTTP-Cookies oder HTTP-Authentifizierungsinformationen). Bei Anfragen mit Anmeldeinformationen wird es als der buchstäbliche Methodenname * ohne besondere Semantik behandelt.

Beispiele

http
Access-Control-Allow-Methods: PUT, DELETE
Access-Control-Allow-Methods: *

Spezifikationen

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

Browser-Kompatibilität

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Access-Control-Allow-Methods
Wildcard (*)

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

Siehe auch