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 eine oder mehrere zulässige HTTP-Anforderungsmethoden an, wenn auf eine Ressource als Antwort auf eine Preflight-Anfrage zugegriffen wird.
| Header-Typ | Antwort-Header |
|---|---|
| Verbotener Header-Name | Nein |
Syntax
Access-Control-Allow-Methods: <method>, <method>, …
Access-Control-Allow-Methods: *
Direktiven
<method>-
Eine durch Kommas getrennte Liste der zulässigen Anforderungsmethoden.
GET,HEADundPOSTsind immer erlaubt, unabhängig davon, ob sie in diesem Header angegeben sind, da sie als CORS-safelisted methods definiert sind. *(Platzhalter)-
Alle HTTP-Methoden. Dies hat nur für Anfragen ohne Anmeldeinformationen (Anfragen ohne HTTP-Cookies oder HTTP-Authentifizierungsinformationen) diese Bedeutung. Bei Anfragen mit Anmeldeinformationen wird es als der wörtliche Methodenname
*ohne besondere Semantik behandelt.
Beispiele
Access-Control-Allow-Methods: PUT, DELETE
Access-Control-Allow-Methods: *
Spezifikationen
| Specification |
|---|
| Fetch Standard # http-access-control-allow-methods |
Browser-Kompatibilität
BCD tables only load in the browser