Skip to content

Commit 1f7c280

Browse files
committed
Add dash/API tabs
1 parent 41b1c83 commit 1f7c280

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/content/docs/waf/tools/replace-insecure-js-libraries.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ head:
66
content: Replace insecure JavaScript libraries
77
---
88

9-
import { GlossaryTooltip } from "~/components";
9+
import { GlossaryTooltip, Tabs, TabItem } from "~/components";
1010

1111
This feature, when turned on, automatically rewrites URLs to external JavaScript libraries to point to Cloudflare-hosted libraries instead. This change improves security and performance, and reduces the risk of malicious code being injected.
1212

@@ -36,10 +36,14 @@ The feature is available in all Cloudflare plans, and is turned on by default on
3636

3737
## Configure
3838

39+
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
40+
3941
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com) and select your account and zone.
4042
2. Go to **Security** > **Settings**.
4143
3. For **Replace insecure JavaScript libraries**, set the toggle to **On** or **Off**.
4244

45+
</TabItem> <TabItem label="API">
46+
4347
Issue a `PATCH` request similar to the following:
4448

4549
```bash
@@ -50,6 +54,8 @@ curl --request PATCH \
5054
--data '{ "value": "on" }'
5155
```
5256

57+
</TabItem> </Tabs>
58+
5359
---
5460

5561
## Final remarks

0 commit comments

Comments
 (0)