Skip to content

Commit fde531c

Browse files
Use placeholder for binding variable and apply throughout
1 parent 553167e commit fde531c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/docs/secrets-store/integrations/workers.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ To bind an account secret to your Worker, you must have one of the following [ro
112112
```toml
113113
main = "./src/index.js"
114114
secrets_store_secrets = [
115-
{ binding = "secrets_store_binding", store_id= "<STORE_ID>", secret_name = "<MY_SECRET_NAME>" }
115+
{ binding = "<BINDING_VARIABLE>", store_id= "<STORE_ID>", secret_name = "<MY_SECRET_NAME>" }
116116
]
117117
```
118118

@@ -147,7 +147,7 @@ You cannot access production secrets (created on the dashboard, via API, or with
147147
export default {
148148
async fetch(request, env) {
149149
// Example of using the secret safely in an API request
150-
const APIkey = await env.secrets_store_binding.get()
150+
const APIkey = await env.<BINDING_VARIABLE>.get()
151151

152152
const response = await fetch("https://api.example.com/data", {
153153
headers: { "Authorization": `Bearer ${APIKey}` },

0 commit comments

Comments
 (0)