55 order : 2
66---
77
8- import { Render , Badge , Tabs , TabItem } from " ~/components" ;
8+ import { Render , Badge , Tabs , TabItem , APIRequest } from " ~/components" ;
99
1010With Browser Isolation, you can define policies to dynamically isolate websites based on identity, security threats, or content.
1111
@@ -148,23 +148,21 @@ Isolate security threats such as malware and phishing.
148148
149149<TabItem label = " API" >
150150
151- ``` bash
152- curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /gateway/rule \
153- --header " Content-Type: application/json" \
154- --header " Authorization: Bearer $CLOUDFLARE_API_TOKEN " \
155- --data ' {
156- "name": "Isolate all security threats",
157- "description": "Isolate security threats such as malware and phishing",
158- "enabled": true,
159- "action": "isolate",
160- "filters": [
161- "http"
162- ],
163- "traffic": "any(http.request.uri.security_category[*] in {68 178 80 83 176 175 117 131 134 151 153})",
164- "identity": "",
165- "device_posture": ""
166- }'
167- ```
151+ <APIRequest
152+ path = " /accounts/{account_id}/gateway/rules"
153+ method = " POST"
154+ json = { {
155+ name: " Isolate all security threats" ,
156+ description: " Isolate security threats such as malware and phishing" ,
157+ enabled: true ,
158+ action: " isolate" ,
159+ filters: [" http" ],
160+ traffic:
161+ " any(http.request.uri.security_category[*] in {68 178 80 83 176 175 117 131 134 151 153})" ,
162+ identity: " " ,
163+ device_posture: " " ,
164+ }}
165+ />
168166
169167</TabItem > </Tabs >
170168
@@ -182,23 +180,21 @@ Isolate high risk content categories such as newly registered domains.
182180
183181<TabItem label = " API" >
184182
185- ``` bash
186- curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /gateway/rule \
187- --header " Content-Type: application/json" \
188- --header " Authorization: Bearer $CLOUDFLARE_API_TOKEN " \
189- --data ' {
190- "name": "Isolate high risk content",
191- "description": "Isolate high risk content categories such as newly registered domains",
192- "enabled": true,
193- "action": "isolate",
194- "filters": [
195- "http"
196- ],
197- "traffic": "any(http.request.uri.content_category[*] in {32 169 177 128})",
198- "identity": "",
199- "device_posture": ""
200- }'
201- ```
183+ <APIRequest
184+ path = " /accounts/{account_id}/gateway/rules"
185+ method = " POST"
186+ json = { {
187+ name: " Isolate high risk content" ,
188+ description:
189+ " Isolate high risk content categories such as newly registered domains" ,
190+ enabled: true ,
191+ action: " isolate" ,
192+ filters: [" http" ],
193+ traffic: " any(http.request.uri.content_category[*] in {32 169 177 128})" ,
194+ identity: " " ,
195+ device_posture: " " ,
196+ }}
197+ />
202198
203199</TabItem > </Tabs >
204200
@@ -216,23 +212,21 @@ Isolate news and media sites, which are targets for malvertising attacks.
216212
217213<TabItem label = " API" >
218214
219- ``` bash
220- curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /gateway/rule \
221- --header " Content-Type: application/json" \
222- --header " Authorization: Bearer $CLOUDFLARE_API_TOKEN " \
223- --data ' {
224- "name": "Isolate news and media",
225- "description": "Isolate news and media sites, which are targets for malvertising attacks",
226- "enabled": true,
227- "action": "isolate",
228- "filters": [
229- "http"
230- ],
231- "traffic": "any(http.request.uri.content_category[*] in {122})",
232- "identity": "",
233- "device_posture": ""
234- }'
235- ```
215+ <APIRequest
216+ path = " /accounts/{account_id}/gateway/rules"
217+ method = " POST"
218+ json = { {
219+ name: " Isolate news and media" ,
220+ description:
221+ " Isolate news and media sites, which are targets for malvertising attacks" ,
222+ enabled: true ,
223+ action: " isolate" ,
224+ filters: [" http" ],
225+ traffic: " any(http.request.uri.content_category[*] in {122})" ,
226+ identity: " " ,
227+ device_posture: " " ,
228+ }}
229+ />
236230
237231</TabItem > </Tabs >
238232
@@ -250,23 +244,21 @@ Isolate content that has not been categorized by [Cloudflare Radar](/radar/).
250244
251245<TabItem label = " API" >
252246
253- ``` bash
254- curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /gateway/rule \
255- --header " Content-Type: application/json" \
256- --header " Authorization: Bearer $CLOUDFLARE_API_TOKEN " \
257- --data ' {
258- "name": "Isolate uncategorized content",
259- "description": "Isolate content not categorized by Cloudflare Radar",
260- "enabled": true,
261- "action": "isolate",
262- "filters": [
263- "http"
264- ],
265- "traffic": "not(any(http.request.uri.content_category[*] in {2 67 125 133 3 75 183 89 182 6 90 91 144 150 7 70 74 76 79 92 96 100 106 107 116 120 121 122 127 139 156 164 99 9 101 137 10 103 146 11 12 77 98 108 110 111 118 126 129 172 168 113 33 179 166 15 115 119 124 141 161 17 85 87 102 157 135 138 180 162 140 142 32 169 177 128 22 73 82 88 148 23 24 181 71 72 173 78 84 86 94 97 104 105 114 174 93 130 132 136 147 149 154 158 152 26 69 184 81 95 109 123 145 155 159 160 163 165 167}))",
266- "identity": "",
267- "device_posture": ""
268- }'
269- ```
247+ <APIRequest
248+ path = " /accounts/{account_id}/gateway/rules"
249+ method = " POST"
250+ json = { {
251+ name: " Isolate uncategorized content" ,
252+ description: " Isolate content not categorized by Cloudflare Radar" ,
253+ enabled: true ,
254+ action: " isolate" ,
255+ filters: [" http" ],
256+ traffic:
257+ " not(any(http.request.uri.content_category[*] in {2 67 125 133 3 75 183 89 182 6 90 91 144 150 7 70 74 76 79 92 96 100 106 107 116 120 121 122 127 139 156 164 99 9 101 137 10 103 146 11 12 77 98 108 110 111 118 126 129 172 168 113 33 179 166 15 115 119 124 141 161 17 85 87 102 157 135 138 180 162 140 142 32 169 177 128 22 73 82 88 148 23 24 181 71 72 173 78 84 86 94 97 104 105 114 174 93 130 132 136 147 149 154 158 152 26 69 184 81 95 109 123 145 155 159 160 163 165 167}))" ,
258+ identity: " " ,
259+ device_posture: " " ,
260+ }}
261+ />
270262
271263</TabItem > </Tabs >
272264
@@ -286,22 +278,19 @@ In **Configure policy settings**, you can customize restrictions for ChatGPT. Fo
286278
287279<TabItem label = " API" >
288280
289- ``` bash
290- curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID /gateway/rule \
291- --header " Content-Type: application/json" \
292- --header " Authorization: Bearer $CLOUDFLARE_API_TOKEN " \
293- --data ' {
294- "name": "Isolate ChatGPT",
295- "description": "Isolate the use of ChatGPT",
296- "enabled": true,
297- "action": "isolate",
298- "filters": [
299- "http"
300- ],
301- "traffic": "any(app.ids[*] in {1199})",
302- "identity": "",
303- "device_posture": ""
304- }'
305- ```
281+ <APIRequest
282+ path = " /accounts/{account_id}/gateway/rules"
283+ method = " POST"
284+ json = { {
285+ name: " Isolate ChatGPT" ,
286+ description: " Isolate the use of ChatGPT" ,
287+ enabled: true ,
288+ action: " isolate" ,
289+ filters: [" http" ],
290+ traffic: " any(app.ids[*] in {1199})" ,
291+ identity: " " ,
292+ device_posture: " " ,
293+ }}
294+ />
306295
307296</TabItem > </Tabs >
0 commit comments