Hide API Keys using Netlify token-hider Function
So, you are making a Frontend application which interacts with a third-party API and chances are high that you will be using an API Key. But, how do you protect your API Key from being exposed to others?
Sadly, you can't hide your API key in the Fron...
aadhi.hashnode.dev3 min read
Dumi
Hello, I found your article very useful. But, what if the API use the key in headers, not parameters? This is the example how I get data from the API:
const BASE_URL = "....."; const ENDPOINTS = "/type=movie"; // There is more than one endpoint, it's dynamic const API_KEY = { headers: { "key": "value"; } }; axios.get(`${BASE_URL}${ENDPOINTS}`, API_KEY).then(........