From ff14e7d28d6b58a22e3daa6a3ab1eac7e97b5269 Mon Sep 17 00:00:00 2001 From: MICHAEL JACKSON Date: Thu, 1 Jun 2017 07:48:01 -0500 Subject: [PATCH] Encode URIs in redirect headers --- server/middleware/ResponseUtils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/middleware/ResponseUtils.js b/server/middleware/ResponseUtils.js index ac37936..2a8ec29 100644 --- a/server/middleware/ResponseUtils.js +++ b/server/middleware/ResponseUtils.js @@ -51,7 +51,7 @@ const sendRedirect = (res, relativeLocation, maxAge = 0, statusCode = 302) => { 'Content-Type': 'text/html', 'Content-Length': html.length, 'Cache-Control': `public, max-age=${maxAge}`, - 'Location': location + 'Location': encodeURI(location) }) res.end(html)