From 775cfb55539e9942797e991645a0c0d83147fe92 Mon Sep 17 00:00:00 2001 From: pawel Date: Wed, 15 Jan 2020 15:26:57 +0100 Subject: [PATCH] prevent appending slash when redirecting error --- server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index e956e24eb2..1c44aac5e2 100644 --- a/server.js +++ b/server.js @@ -53,7 +53,9 @@ app.prepare().then(() => { // error.dvc.org/{hdr} -> dvc.org/doc/user-guide/troubleshooting#{hdr}, res.writeHead(303, { 'Cache-Control': 'no-cache', - Location: 'https://dvc.org/doc/user-guide/troubleshooting#' + pathname + Location: + 'https://dvc.org/doc/user-guide/troubleshooting#' + + pathname.substring(1) }) res.end() } else if (/^(code|data|remote)\.dvc\.org$/.test(req.headers.host)) {