0
0

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.

WebAPIにアクセス時なぜか403エラーが発生する時の対処法

Last updated at Posted at 2020-11-13

概要

chromeの拡張機能であるTalend API TesterでWebAPIにリクエストを送信した際、なぜか403 Forbiddenが発生した。curlコマンドを使用してリクエストを送信した場合は、正常にリクエストを送信できていたので少し戸惑った。

そこで、上記課題の解決策(?)があったので(より良い方法があるかもしれませんが...)まとめておきます。

METHOD: GET
PATH: http://example.com/sample.txt

---- 下記をHEADERSに追加する ----
HEADERS: Origin: http://example.com ← 接続先のURLをここに追加する

Webブラウザー上のAPIテストツールを使用する場合は注意していきたいです...。

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?