Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,15 @@ To add environment variables via the dashboard:
2. Select **Workers & Pages**.
3. In **Overview**, select your Worker.
4. Select **Settings**.
5. Select **Variables**.
6. Under **Environment Variables**, select **Add variable**.
7. Input a **Variable name** and its **Value**, which will be made available to your Worker.
8. (Optional) To add multiple environment variables, select **Add variable**.
9. Select **Save and deploy** to implement your changes.
5. Under **Variables and Secrets**, select **Add**.
6. Select a **Type**, input a **Variable name**, and input its **Value**. This variable will be made available to your Worker.
7. (Optional) To add multiple environment variables, select **Add variable**.
8. Select **Deploy** to implement your changes.

:::caution[Plaintext strings and secrets]


Only select **Encrypt** if your environment variable is a [secret](/workers/configuration/secrets/).
Select the **Secret** type if your environment variable is a [secret](/workers/configuration/secrets/).


:::
Expand Down
16 changes: 8 additions & 8 deletions src/content/docs/workers/configuration/secrets.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,10 @@ To add a secret via the dashboard:
1. Log in to [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
2. Select **Workers & Pages**.
3. In **Overview**, select your Worker > **Settings**.
4. Under **Environment Variables**, select **Add variable**.
5. Input a **Variable name** and its **value**, which will be made available to your Worker.
6. Select **Encrypt** to protect the secret's value. This will prevent the value from being visible via Wrangler and the dashboard.
7. (Optional) To add multiple secrets, select **Add variable**.
8. **Save** or **Save and Deploy** your changes.
4. Under **Variables and Secrets**, select **Add**.
5. Select the type **Secret**, input a **Variable name**, and input its **Value**. This secret will be made available to your Worker but the value will be hidden in Wrangler and the dashboard.
6. (Optional) To add more secrets, select **Add variable**.
7. Select **Deploy** to implement your changes.

### Delete secrets from your project

Expand All @@ -77,9 +76,10 @@ To delete a secret from your Worker project via the dashboard:
1. Log in to [Cloudflare dashboard](https://dash.cloudflare.com/) and select your account.
2. Select **Workers & Pages**.
3. In **Overview**, select your Worker > **Settings**.
4. Under **Environment Variables**, select **Edit variables**.
5. Select **X** next to the secret you want to delete.
6. **Save** or **Save and Deploy** your changes.
4. Under **Variables and Secrets**, select **Edit**.
5. In the **Edit** drawer, select **X** next to the secret you want to delete.
6. Select **Deploy** to implement your changes.
7. (Optional) Instead of using the edit drawer, you can click the delete icon next to the secret.

<Render file="env_and_secrets" />

Expand Down
Loading