Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Environment Variables/Secrets in Frontend Clones #5861

Open
enahsor opened this issue Jun 1, 2021 · 4 comments
Open

Support for Environment Variables/Secrets in Frontend Clones #5861

enahsor opened this issue Jun 1, 2021 · 4 comments
Labels
🎒 Bundler Refers to CodeSandbox's In-Browser Bundler ✨ Feature Indicates that this adds a new feature.

Comments

@enahsor
Copy link

enahsor commented Jun 1, 2021

🌈 Feature

This feature already exists on server clones. There's a tab called 'Server Control Panel' which doesn't appear on React clones. It allows you to store environment variables for your application. It's not hard to see how this feature would prove useful.

@DeMoorJasper DeMoorJasper added ✨ Feature Indicates that this adds a new feature. 🎒 Bundler Refers to CodeSandbox's In-Browser Bundler labels Jun 7, 2021
@DeMoorJasper
Copy link
Member

Thanks for your feedback!

I have added your feature request to our internal backlog which we use to prioritize what to build next. We can't make any promises about the timing, but it's on the list!

If you'd like to work on this feature with us, please create a pull request and we'll help you along the way.

For others landing on this issue, feel free to add more context or simply leave a thumbs up 👍 on this comment if you find this feature useful.

@enahsor
Copy link
Author

enahsor commented Jun 7, 2021

Sure. I'll give it a try.

@enahsor
Copy link
Author

enahsor commented Jun 14, 2021

@DeMoorJasper what's to stop me from simply importing the 'Server' component found on server sandboxes and using it on frontend sandboxes and it just working?

@DeMoorJasper
Copy link
Member

DeMoorJasper commented Jul 11, 2021

I think the server component is very tied to a server instance that's probably why it won't work.

To begin it would probably be best to support basic .env file support and than additionally add some ui to more easily edit this file? As a hacky way of supporting this we could make process a global variable that has a js object representation of the .env file.

Having secrets in a browser based sandbox will be a more complicated undertaking as we'll have to store these securely on the api and ensure we never leak these in compiled code. But than it probably no longer really makes sense to use a browser-based sandbox anyway as client-side code can never really have secrets?

Sorry for the very late reply, this issue got buried in my github notifications

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎒 Bundler Refers to CodeSandbox's In-Browser Bundler ✨ Feature Indicates that this adds a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants