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.

google vision apiをhocalhostでリファラーの制限を設定する

Posted at

google vision api を開発環境で実行すると↓のエラーになります。


'"message"=>Requests from referer <empty> are blocked.' '"status"=>"PERMISSION_DENIED",

APIのリファラーの制限をしている
開発環境でリファラーの制限しても動作させる方法

header にRefererを設定するとhocalhostでも動作する

https://qiita.com/kasajei/items/78f934b943ebdff7ef08
headers = {
'Content-Type': 'application/json',
'Referer': 'your domain here'
}

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?