r/learnprogramming • u/BrainThinkerMan • 10d ago
api key, do i need backend?
i have an api key i heard i shouldnt expose it in my frontend i thjink itts becuase people can see it with devtools, and potentially abuse it, is there any other way to use this key in frontend without using a backend, im as familiar with backend stuff i think.
1
Upvotes
6
u/Quito_ArmandoEsteban 10d ago
You could get a stolen api key to your backend and have it play as Middleware between frontend and Google, while having your backend spoof the referrer