Skip to content

Commit 5058783

Browse files
committed
Update to generic recommendation
1 parent 95852ed commit 5058783

File tree

2 files changed

+12
-37
lines changed

2 files changed

+12
-37
lines changed

src/content/docs/rules/cloud-connector/providers.mdx

Lines changed: 7 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ sidebar:
55
order: 4
66
---
77

8+
import { Render } from "~/components";
9+
810
Cloud Connector currently supports the following cloud providers and services:
911

1012
- Amazon Web Services - S3
@@ -38,43 +40,7 @@ Cloud Connector supports both subdomain and URI path-style URLs:
3840

3941
For more information, refer to the [Amazon S3 documentation](https://docs.aws.amazon.com/AmazonS3/latest/userguide/EnableWebsiteHosting.html).
4042

41-
### Configure bucket policies to allow Cloudflare IP addresses
42-
43-
Now that you’ve created your buckets and enabled hosting for static content, you can set up permissions to allow Cloudflare to access your bucket.
44-
This ensures that your site only responds to requests coming from the Cloudflare proxy. This is the [current list of IP address ranges](https://www.cloudflare.com/ips/) used by the Cloudflare proxy.
45-
46-
To set up your policy:
47-
48-
1. Follow these instructions from Amazon to [Add an S3 Bucket Policy](https://docs.aws.amazon.com/AmazonS3/latest/user-guide/add-bucket-policy.html).
49-
2. For the step where you enter the policy in the **Bucket policy editor**, use this sample to fill out the needed JSON code, making sure to replace:
50-
- `www.example.com` (appearing in `"Resource": "arn:aws:s3:www.example.com/*"`) with the S3 bucket name for your subdomain URL.
51-
- The placeholder IP addresses with the [current list of IP address ranges](https://www.cloudflare.com/ips/)
52-
53-
```json
54-
{
55-
"Version": "2012-10-17",
56-
"Statement": [
57-
{
58-
"Sid": "AllowCloudflareIPs",
59-
"Effect": "Allow",
60-
"Principal": "*",
61-
"Action": "s3:GetObject",
62-
"Resource": "arn:aws:s3:::www.example.com/*",
63-
"Condition": {
64-
"IpAddress": {
65-
"aws:SourceIp": [
66-
"192.2.0.1/32" (example IPv4 address),
67-
"192.2.1.0/24" (example IPv4 range),
68-
"2001:db8::1111:1111" (example IPv6 address),
69-
"2001:db8::/32" (example IPv6 range),
70-
(add all IPs ranges at https://www.cloudflare.com/ips)
71-
]
72-
}
73-
}
74-
}
75-
]
76-
}
77-
```
43+
<Render file="cloud-connector-limit-bucket-to-cloudflare-ips" />
7844

7945
## Google Cloud Platform - Cloud Storage
8046

@@ -101,6 +67,8 @@ Cloud Connector supports both subdomain and URI path-style URLs:
10167

10268
If the files in your bucket are not publicly accessible, you must change the bucket permissions. For details, refer to the [Google Cloud Storage documentation](https://cloud.google.com/storage/docs/access-control/making-data-public#buckets).
10369

70+
<Render file="cloud-connector-limit-bucket-to-cloudflare-ips" />
71+
10472
## Microsoft Azure - Blob Storage
10573

10674
The hostname of your Blob Storage bucket URL must have one of the following formats:
@@ -117,3 +85,5 @@ For Azure Blog Storage, Cloud Connector supports only subdomain URLs like `<BUCK
11785
3. Get your bucket URL from the **Blob service** endpoint or the **Static website** endpoint.
11886

11987
If the blob container is not configured for public access, you must change the container settings. For details, refer to the [Azure Storage documentation](https://learn.microsoft.com/en-us/azure/storage/blobs/anonymous-read-access-configure?tabs=portal).
88+
89+
<Render file="cloud-connector-limit-bucket-to-cloudflare-ips" />
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
{}
3+
---
4+
5+
Once you configure Cloud Connector with your storage provider's public bucket, you may wish that only Cloudflare can access the objects in that bucket. To achieve this, check your provider's documentation on how to create a policy that only allows incoming requests from [Cloudflare IP addresses](https://www.cloudflare.com/ips/).

0 commit comments

Comments
 (0)