Skip to content

Commit

Permalink
chore: tweak URL rewriting for local previews (#15992)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Jun 13, 2022
1 parent ad54d02 commit 58a1bf0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/.eleventy.js
Expand Up @@ -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();
Expand Down

0 comments on commit 58a1bf0

Please sign in to comment.