Environment Variables Access
CrafterCMS supports a whitelisted list of variable names or patterns for a secure environment variables access.
By default, custom environment variables prefixed by crafter_
are accessible using System.getenv()
. If you wish
to use a different prefix, or add other variable names to the whitelist, this may be configured in Studio, Engine and
Deployer as shown below:
# List of patterns for that is allowed to call as `staticMethod java.lang.System getenv java.lang.String` parameter (regexes separated by commas)
studio.scripting.sandbox.whitelist.getenvRegex: crafter_.*
# List of patterns for that is allowed to call as `staticMethod java.lang.System getenv java.lang.String` parameter (regexes separated by commas)
crafter.engine.groovy.sandbox.whitelist.getenvRegex=crafter_.*
whitelist:
# List of patterns for that is allowed to call as `staticMethod java.lang.System getenv java.lang.String` parameter (regexes separated by commas)
getenvRegex: crafter_.*
See Environment Variables for more information on CrafterCMS default environment variables.