19
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CORS許可されているかをcURLで確認する方法

Last updated at Posted at 2019-11-27

いっつも忘れてしまうので備忘録として。

curl -H "Origin: #{アクセス元のドメイン}" \
     -H "Access-Control-Request-Method: #{メソッド}" \
     -X OPTIONS --verbose \
        #{アクセス先のURL}

使用例

curl -H "Origin: localhost:3000" \
     -H "Access-Control-Request-Method: GET" \
     -X OPTIONS --verbose \
        https://qiita.com/api/v2/items

19
17
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?