[RUBY] Set referrer limits on google vision api with hocalhost

When I run google vision api in the development environment, I get the error ↓.


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

Restricting API referrer How to operate even if referrer is restricted in the development environment

If Referer is set in header, it also works with hocalhost.

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

Recommended Posts

Set referrer limits on google vision api with hocalhost
Set up ImpressPages 5.0 with LAMP on CentOS 7.3
Inference with Custom Vision model on Jetson Nano
Procedure for operating google spreadsheet with API (ruby)
I want to hit the API with Rails on multiple docker-composes set up locally