I'm using jQuery with Bitly API to automate links shortening, but since the code on client side the API key can be easily compromised, regardless of obfuscation.
My question: Is there a way to restrict requests to a specific domain? In other words, if the request originated from example.com
then pass it, otherwise refuse.
I searched through bitly account preferences and API but couldn't spot that ability, perhaps because of my limited experience. I'd appreciate it if anyone can help with this or provide an alternative workaround.
Thank you in advance.