Skip to content

Commit bdb2f73

Browse files
authored
Apply suggestions from code review
1 parent 91f4349 commit bdb2f73

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/content/docs/workers/configuration/environment-variables.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -136,18 +136,11 @@ BAZ = { "a": 123 }
136136
Environment variables can be added using either the `wrangler.{json|jsonc|toml}` file or via the Cloudflare
137137
dashboard 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

144142
The 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
152145
Note also that because secrets are a form of environment variable within the runtime,
153146
secrets are also exposed via `process.env`.

0 commit comments

Comments
 (0)