File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
src/content/docs/workers/configuration Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -136,18 +136,11 @@ BAZ = { "a": 123 }
136136Environment variables can be added using either the ` wrangler.{json|jsonc|toml} ` file or via the Cloudflare
137137dashboard UI.
138138
139- The value of ` process.env.FOO ` will be the JavaScript string ` "abc" ` .
140-
141- The value of ` process.env.BAR ` will be the JavaScript string ` "abc" ` (note that the
142- JSON encoding is removed).
139+ The values of ` process.env.FOO ` and ` process.env.BAR ` will each be the
140+ JavaScript string ` "abc" ` .
143141
144142The value of ` process.env.BAZ ` will be the JSON-encoded string ` "{ "a": 123 }" ` .
145143
146- These rules mean that if you have a JSON environment variable whose value is a
147- JSON-encoded string and you * want* to be able to parse it as JSON within your
148- application (e.g. ` JSON.parse(process.env.BAR) ` ) then the value will need to
149- be "double encoded", for instance ` '"\\"abc\\""' ` .
150-
151144:::note
152145Note also that because secrets are a form of environment variable within the runtime,
153146secrets are also exposed via ` process.env ` .
You can’t perform that action at this time.
0 commit comments