From 58a1bf0de33adb1d54c8051090f01984daa08c86 Mon Sep 17 00:00:00 2001 From: Milos Djermanovic Date: Mon, 13 Jun 2022 16:02:50 +0200 Subject: [PATCH] chore: tweak URL rewriting for local previews (#15992) --- docs/.eleventy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/.eleventy.js b/docs/.eleventy.js index 4aa1c25f501..f8691ec28e4 100644 --- a/docs/.eleventy.js +++ b/docs/.eleventy.js @@ -390,7 +390,7 @@ module.exports = function(eleventyConfig) { */ eleventyConfig.setBrowserSyncConfig({ middleware: (req, res, next) => { - if (!/(?:\.[^/]+|\/)$/u.test(req.url)) { + if (!/(?:\.[a-zA-Z][^/]*|\/)$/u.test(req.url)) { req.url += ".html"; } return next();