Access-Control-Allow-Methods Header Explained

What the HTTP Access-Control-Allow-Methods header does and when it's used.

Published October 15, 2026

Access-Control-Allow-Methods lists the HTTP methods allowed for cross-origin requests, returned in answer to a preflight OPTIONS request.

How it works

Simple GET/POST requests may not need it, but PUT, PATCH and DELETE do.

The Access-Control-Allow-Methods header is part of the HTTP message and is case-insensitive in name.

In a real exchange

curl -i https://example.com/
Access-Control-Allow-Methods: GET, POST, PUT, DELETE
Where Access-Control-Allow-Methods appears.

Practical examples

The header

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

Set or use it in code

res.set('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS')

Inspect it

curl -sI https://example.com | grep -i 'access-control-allow-methods'

Common mistakes

  • Not handling the OPTIONS preflight
  • Missing methods your client uses
  • Setting it only on non-preflight responses

Key takeaways

  • Access-Control-Allow-Methods: Access-Control-Allow-Methods lists the HTTP methods allowed for cross-origin requests, returned in answer to a preflight OPTIONS request.
  • Check it in browser DevTools → Network.
  • Test with curl -I before deploying.

FAQ

Where is it sent?

In the response to the preflight request.

Is Access-Control-Allow-Methods case sensitive?

Header names are case-insensitive; values may not be.

More HTTP articles