diff options
author | 2024-09-11 18:26:34 +0530 | |
---|---|---|
committer | 2024-09-11 13:56:34 +0100 | |
commit | 95cf8d63154dcb32203c1a271284d367bdf00cf4 (patch) | |
tree | 2d95bf4896b695879a912369643f10c2e9bc8119 /packages/integrations/netlify/src | |
parent | faf861242014fddf58d74af16976c5845bc88e8f (diff) | |
download | astro-95cf8d63154dcb32203c1a271284d367bdf00cf4.tar.gz astro-95cf8d63154dcb32203c1a271284d367bdf00cf4.tar.zst astro-95cf8d63154dcb32203c1a271284d367bdf00cf4.zip |
fix: allow `-` in hostnames for Netlify Image CDN (#388)
* fix: allow `-` in hostnames for Netlify Image CDN RegEx
* Update orange-countries-scream.md
---------
Co-authored-by: Matt Kane <m@mk.gg>
Diffstat (limited to 'packages/integrations/netlify/src')
-rw-r--r-- | packages/integrations/netlify/src/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/integrations/netlify/src/index.ts b/packages/integrations/netlify/src/index.ts index 92f4b8a4d..07d5bf01d 100644 --- a/packages/integrations/netlify/src/index.ts +++ b/packages/integrations/netlify/src/index.ts @@ -46,11 +46,11 @@ export function remotePatternToRegex( if (hostname) { if (hostname.startsWith('**.')) { // match any number of subdomains - regexStr += '([a-z0-9]+\\.)*'; + regexStr += '([a-z0-9-]+\\.)*'; hostname = hostname.substring(3); } else if (hostname.startsWith('*.')) { // match one subdomain - regexStr += '([a-z0-9]+\\.)?'; + regexStr += '([a-z0-9-]+\\.)?'; hostname = hostname.substring(2); // Remove '*.' from the beginning } // Escape dots in the hostname |