Skip to content

Access-Control-Allow-Methods

Informs the browser which HTTP methods are permitted for cross-origin requests.

The Access-Control-Allow-Methods response header is used during CORS preflight requests. When a client wants to send a complex cross-origin request (e.g. using PUT or DELETE), the browser auto-sends an OPTIONS request first. The server responds with this header to declare which HTTP methods it supports for the given resource.

Set this on your server’s OPTIONS route handlers whenever you run an API that accepts state-changing actions from remote sites.

It prevents browsers from sending blind DELETE requests to foreign servers that don’t explicitly opt-in to receiving them.

Supply a comma-separated list of the allowed verbs. Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS

Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE