Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I hide api key when inspecting on network? #522

Open
minhokokocrunch opened this issue Sep 15, 2021 · 1 comment
Open

How can I hide api key when inspecting on network? #522

minhokokocrunch opened this issue Sep 15, 2021 · 1 comment

Comments

@minhokokocrunch
Copy link

I didn't want to show api key for anyone who inspect the network on browser.
How can I hide it?

@eegli
Copy link

eegli commented Sep 29, 2021

Generally, you don't need to. And you can't - since it's a client-side script. Just make sure that:

  1. Your key has the right restrictions applied, e.g. HTTP referrers. You can restrict the key to only work on specific domains. If someone tries to use your key outside of your domain, it will not work.
  2. Use different keys for different environments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants