cancel
Showing results for 
Search instead for 
Did you mean: 

How to hide environment variables when putting configuration file in plugin folder

ducnv_resolve
7 - Data Storage
7 - Data Storage

I am using Mapbox to create a new widget and add it as an add-on. I noticed that by placing the entire source code in the /plugins directory (including the file containing environment variables - config.js), anyone can access my token and source code. How can I prevent this from happening?

1 REPLY 1

DRay
Community Team Member
Community Team Member

Hello @ducnv_resolve,

Thank you for reaching out here. I see that this question hasn't had a response yet, so I am reaching out internally to try and get you an answer. 

David Raynor (DRay)