Encode URIs in redirect headers

This commit is contained in:
MICHAEL JACKSON 2017-06-01 07:48:01 -05:00
parent 08407a1a2d
commit ff14e7d28d
1 changed files with 1 additions and 1 deletions

View File

@ -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)