Design comparison
SolutionDesign
Solution retrospective
How can we hide the API key using environment variables on client side. Any idea? Do we need to code a server to do this?
Community feedback
- @skanthanvijayPosted over 3 years ago
The most common way to hide API keys would be to do it as a fullstack app with environment variables off-client. For the Mapbox API key however, you can just restrict its URL to where you host the page so that others cant use it even if they see it.
Marked as helpful1@rohailtahaPosted over 3 years ago@skanthanvijay Thanks a lot! So fullstack is the common way to go for such apps.
1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord