Skip to content

Commit 2243f3a

Browse files
authored
fix: update domain url docs (#735)
1 parent 93430e2 commit 2243f3a

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

Diff for: docs/image-cdn.md

+5-12
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ NETLIFY_IMAGE_CDN = "true"
1818

1919
[images]
2020
remote_images = [
21-
'^https:\\/\\/example1\\.com\\/.*',
22-
'^https:\\/\\/example2\\.com\\/.*'
21+
'https://example1.com/.*',
22+
'https://example2.com/.*'
2323
]
2424
```
2525

@@ -33,7 +33,7 @@ configuration of it.
3333
remote_images = [
3434
# <your-contentful-space-id> is specified in the `spaceId` option for the
3535
# gatsby-source-contentful plugin in your gatsby-config file.
36-
"^https:\\/\\/images\\.ctfassets\\.net\\/<your-contentful-space-id>\\/.*"
36+
"https://images.ctfassets.net/<your-contentful-space-id>/.*"
3737
]
3838
```
3939

@@ -44,7 +44,7 @@ configuration of it.
4444
remote_images = [
4545
# <your-drupal-base-url> is speciafied in the `baseUrl` option for the
4646
# gatsby-source-drupal plugin in your gatsby-config file.
47-
"^<your-drupal-base-url>\\/.*"
47+
"<your-drupal-base-url>/.*"
4848
]
4949
```
5050

@@ -56,21 +56,14 @@ configuration of it.
5656
# <your-wordpress-url> is specified in the `url` option for the
5757
# gatsby-source-wordpress plugin in your gatsby-config file.
5858
# There is no need to include `/graphql in the path here`
59-
"^<your-wordpress-url>\\/.*"
59+
"<your-wordpress-url>/.*"
6060
]
6161
```
6262

6363
Above examples are the most likely ones to be needed. However if you configure
6464
your CMS to host assets on different domain or path, you might need to adjust
6565
the patterns accordingly.
6666

67-
Keep in mind that you will need to escape special regular expression symbols to
68-
avoid creating too permisible patterns:
69-
70-
- `.` should be escaped as `\\.` (dot)
71-
- `/` should be escaped as `\\/` (slash)
72-
- your rule should start with `^` so domain matching is exact
73-
7467
## How it works
7568

7669
When using the Image CDN, Gatsby generates URLs of the form

0 commit comments

Comments
 (0)