-
-
Notifications
You must be signed in to change notification settings - Fork 436
Description
I find Mockoon CLI useful for testing purposes in CI/CD environments. In my use case, I am spinning up multiple Mockoon instances running in a Docker container. Even tho I want them to source from the same config file, I would prefer having the option to identify instances.
As a solution to this, I would like to add a new set of helpers that would allow you to read environment variables. Implementation might look something like this:
{ "server": "{{env 'Variable-Name' 'default value'}}" }
To keep the solution secure, this would only allow reading variables that are prefixed with MOCKOON_
. There should be an option (CLI parameter?) to change this prefix. Setting prefix to empty string and allowing reading any variable should NOT be allowed.
Source of security concerns and solutions is Vite.
TODO:
- Discuss implementation with maintainers
- Add
System Helpers
- Implement environment variable system helper
- Write tests (if applicable)
- Update docs
If possible, I would like to contribute to this issue.
Metadata
Metadata
Labels
Type
Projects
Status