Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. HTTP
  3. Guides
  4. Cross-Origin Resource Sharing (CORS)
  5. CORS errors
  6. Reason: Did not find method in CORS header 'Access-Control-Allow-Methods'

Reason: Did not find method in CORS header 'Access-Control-Allow-Methods'

Reason

Reason: Did not find method in CORS header 'Access-Control-Allow-Methods'

What went wrong?

The HTTP method being used by theCORS request is not included in thelist of methods specified by the response'sAccess-Control-Allow-Methods header. This header specifies acomma-delimited list of the HTTP methods which may be used when using CORS to accessthe URL specified in the request; if the request is using any other method, this erroroccurs.

For example, if the response includes:

http
Access-Control-Allow-Methods: GET,HEAD,POST

Trying to use aPUT request will fail with this error.

Make sure your code only uses the permitted HTTP methods when accessing the service.

Note:If the server includes any unrecognized or undefined method names in itsAccess-Control-Allow-methods header, a different error occurs:Reason: invalid token 'xyz' in CORS header 'Access-Control-Allow-Methods'.

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp