From c662791505f014d95b3db7961e9c476f9b695ed4 Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 30 Jan 2017 23:48:46 -0500 Subject: Trim extra leading slashes --- lib/serve.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/serve.js b/lib/serve.js index e85ca31..df2b089 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -113,6 +113,7 @@ Serve.prototype.respondSink = function (status, headers, cb) { Serve.prototype.path = function (url) { var m + url = url.replace(/^\/+/, '/') switch (url) { case '/': return this.home() case '/robots.txt': return this.res.end('User-agent: *') -- cgit v1.2.3