Skip to content

Commit 414a17e

Browse files
committed
fix(prerenderer): configure trust proxy to fix http -> https redirects
1 parent d9fa326 commit 414a17e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

prerender-server/src/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ app.use((req, res, next) => {
109109
totalRenders.inc()
110110
}
111111
if (err) return next(err)
112-
if (resp.redirect) return res.redirect(301, baseHref + resp.redirect.substr(1))
112+
if (resp.redirect) return res.redirect(301, baseHref + resp.redirect)
113113
if (resp.errorCode) {
114114
console.error(`Failed with code ${resp.errorCode}:`, resp)
115115
return res.sendStatus(resp.errorCode)

0 commit comments

Comments
 (0)