Skip to content

Commit de04882

Browse files
committed
Add API call
1 parent ca234c8 commit de04882

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

src/content/docs/cloudflare-one/policies/gateway/http-policies/common-policies.mdx

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,12 +401,38 @@ curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rule \
401401

402402
Block file uploads from Google Drive.
403403

404+
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
405+
404406
| Selector | Operator | Value | Logic | Action |
405407
| ---------------- | ------------- | -------------------------------------- | ----- | ------ |
406-
| Application | in | Google Drive | And | Block |
408+
| Application | in | _Google Drive_ | And | Block |
407409
| Upload Mime Type | matches regex | `.*` | And | |
408410
| Host | is not | `drivefrontend-pa.clients6.google.com` | | |
409411

412+
</TabItem>
413+
414+
<TabItem label="API">
415+
416+
```bash
417+
curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rule \
418+
--header "Content-Type: application/json" \
419+
--header "Authorization: Bearer <API_TOKEN>" \
420+
--data '{
421+
"name": "Block Google Drive uploads",
422+
"description": "Block file uploads to Google Drive",
423+
"enabled": true,
424+
"action": "block",
425+
"filters": [
426+
"http"
427+
],
428+
"traffic": "any(app.ids[*] in {554}) and http.upload.mime matches \".*\" and not(http.request.host == \"drivefrontend-pa.clients6.google.com\")",
429+
"identity": "",
430+
"device_posture": ""
431+
}'
432+
```
433+
434+
</TabItem> </Tabs>
435+
410436
### Block Gmail downloads
411437

412438
Block file downloads from Gmail.

0 commit comments

Comments
 (0)