How to secure your Node.js API key?
Thread 🧵👇
Thread 🧵👇
Although making your API key public is a bad idea, it still happens.
- Sometimes, we include it in the GET request parameters.
- Other times, we commit the key to GitHub in our code.
- Sometimes, we include it in the GET request parameters.
- Other times, we commit the key to GitHub in our code.
The are two solutions for this.
1️⃣ The first is to implement a proxy for the API.
2️⃣ The second simpler-to-implement solution is to use the .env (environment) file.
Let's demonstrate.
1️⃣ The first is to implement a proxy for the API.
2️⃣ The second simpler-to-implement solution is to use the .env (environment) file.
Let's demonstrate.
Hope you enjoyed this thread.
If you found this thread useful, follow @Rapid_API 🐙💙
If you found this thread useful, follow @Rapid_API 🐙💙
جاري تحميل الاقتراحات...