From fc61b60739a7b780890ed1e7e09d2e1872fdfe02 Mon Sep 17 00:00:00 2001 From: kathmbeck Date: Mon, 18 Dec 2023 14:47:28 -0500 Subject: [PATCH] fix: update domain url docs --- docs/image-cdn.md | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/docs/image-cdn.md b/docs/image-cdn.md index efe94834..60cd0951 100644 --- a/docs/image-cdn.md +++ b/docs/image-cdn.md @@ -18,8 +18,8 @@ NETLIFY_IMAGE_CDN = "true" [images] remote_images = [ - '^https:\\/\\/example1\\.com\\/.*', - '^https:\\/\\/example2\\.com\\/.*' + 'https://example1.com/.*', + 'https://example2.com/.*' ] ``` @@ -33,7 +33,7 @@ configuration of it. remote_images = [ # is specified in the `spaceId` option for the # gatsby-source-contentful plugin in your gatsby-config file. - "^https:\\/\\/images\\.ctfassets\\.net\\/\\/.*" + "https://images.ctfassets.net//.*" ] ``` @@ -44,7 +44,7 @@ configuration of it. remote_images = [ # is speciafied in the `baseUrl` option for the # gatsby-source-drupal plugin in your gatsby-config file. - "^\\/.*" + "/.*" ] ``` @@ -56,7 +56,7 @@ configuration of it. # is specified in the `url` option for the # gatsby-source-wordpress plugin in your gatsby-config file. # There is no need to include `/graphql in the path here` - "^\\/.*" + "/.*" ] ``` @@ -64,13 +64,6 @@ Above examples are the most likely ones to be needed. However if you configure your CMS to host assets on different domain or path, you might need to adjust the patterns accordingly. -Keep in mind that you will need to escape special regular expression symbols to -avoid creating too permisible patterns: - -- `.` should be escaped as `\\.` (dot) -- `/` should be escaped as `\\/` (slash) -- your rule should start with `^` so domain matching is exact - ## How it works When using the Image CDN, Gatsby generates URLs of the form