Protect your Google API key on Cloudflare

Hello,

I have a Google API key to use with Google Maps and Geocoding.
In order to prevent abuse I have applied a HTTP restriction.
However, it seems that this is not working, as I am being blocked from my own website.

Does this have anything to do with Cloudflare? As the request might be coming from a Cloudflare server?
Is there a recommended way to deal with this?

Thank you

What HTTP restriction did you apply?

Withing Google Cloud platform I have a HTTP referral restriction on the API key for my website
so:
https://www.domain.com*
http://www.domain.com*
domain.com*

That’s not a Cloudflare issue. You’ve blocked any direct access to your resources if they don’t include a Referrer header. Typing in your website on your browser is direct access with no referrer.

Thank you sdayman. Not 100% sure what you mean.
But basically this is not Cloudflare; so the issue is with something else?
Or should I configure the API-key restrictions differently?

This topic was automatically closed after 30 days. New replies are no longer allowed.