diff --git a/CHANGELOG.md b/CHANGELOG.md index 29f94177c2..486dd383e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -35,6 +35,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - findConfigurableChildAsync - return best match for configurable variant - @gibkigonzo (#4042) - use storeCode for mappingFallback url - @gibkigonzo (#4050) - `getVariantWithLowestPrice` uses inexistent `final_price` property - @cewald (#4091) +- Fixed `NOT_ALLOWED_SSR_EXTENSIONS_REGEX` to only match with file extensions having a dot - @haelbichalex (#4100) ### Changed / Improved - Optimized `translation.processor` to process only enabled locale CSV files - @pkarw (#3950) diff --git a/config/default.json b/config/default.json index 209176db3b..d5ef6a0611 100644 --- a/config/default.json +++ b/config/default.json @@ -23,7 +23,7 @@ "dynamicConfigInclude": [], "elasticCacheQuota": 4096, "ssrDisabledFor": { - "extensions": [".png", ".gif", ".jpg", ".jpeg", ".woff", ".eot", ".woff2", ".ttf", ".svg", ".css", ".js", ".json", ".ico", ".tiff", ".tif", ".raw"] + "extensions": ["png", "gif", "jpg", "jpeg", "woff", "eot", "woff2", "ttf", "svg", "css", "js", "json", "ico", "tiff", "tif", "raw"] }, "trace": { "enabled": false, diff --git a/core/scripts/server.ts b/core/scripts/server.ts index 3cb9450e48..9c58a1f8c9 100755 --- a/core/scripts/server.ts +++ b/core/scripts/server.ts @@ -29,7 +29,7 @@ const compileOptions = { escape: /{{([^{][\s\S]+?[^}])}}/g, interpolate: /{{{([\s\S]+?)}}}/g } -const NOT_ALLOWED_SSR_EXTENSIONS_REGEX = new RegExp(`(.*)(${config.server.ssrDisabledFor.extensions.join('|')})$`) +const NOT_ALLOWED_SSR_EXTENSIONS_REGEX = new RegExp(`^.*\\.(${config.server.ssrDisabledFor.extensions.join('|')})$`) const isProd = process.env.NODE_ENV === 'production' process['noDeprecation'] = true