Skip to content

Commit 400be6e

Browse files
authored
[Gateway] Fix GDrive common HTTP policy (#17490)
1 parent 876e546 commit 400be6e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,42 @@ curl https://api.cloudflare.com/client/v4/accounts/{account_id}/gateway/rule \
397397

398398
</TabItem> </Tabs>
399399

400+
### Block Google Drive uploads
401+
402+
Block file uploads from Google Drive.
403+
404+
<Tabs syncKey="dashPlusAPI"> <TabItem label="Dashboard">
405+
406+
| Selector | Operator | Value | Logic | Action |
407+
| ---------------- | ------------- | -------------------------------------- | ----- | ------ |
408+
| Application | in | _Google Drive_ | And | Block |
409+
| Upload Mime Type | matches regex | `.*` | And | |
410+
| Host | is not | `drivefrontend-pa.clients6.google.com` | | |
411+
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 $CLOUDFLARE_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+
400436
### Block Gmail downloads
401437

402438
Block file downloads from Gmail.

0 commit comments

Comments
 (0)