From 2ba0d620a897952f5b265ca13a86db4084e511ce Mon Sep 17 00:00:00 2001 From: Daniel O'Connor Date: Wed, 10 Jan 2018 05:35:43 -0800 Subject: [PATCH] Support URLs that end in SemVer ranges (#3305) Fixes #3164. --- packages/gatsby/src/commands/develop.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/gatsby/src/commands/develop.js b/packages/gatsby/src/commands/develop.js index 76aa60a08d341..69786ac445ee6 100644 --- a/packages/gatsby/src/commands/develop.js +++ b/packages/gatsby/src/commands/develop.js @@ -176,7 +176,7 @@ async function startServer(program) { // Render an HTML page and serve it. app.use((req, res, next) => { const parsedPath = parsePath(req.path) - if (parsedPath.extname === `` || parsedPath.extname.startsWith(`.html`)) { + if (parsedPath.extname === `` || parsedPath.extname.startsWith(`.html`) || parsedPath.path.endsWith(`/`)) { res.sendFile(directoryPath(`public/index.html`), err => { if (err) { res.status(500).end()