We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad701c2 commit b83e010Copy full SHA for b83e010
packages/open-next/src/core/routingHandler.ts
@@ -96,6 +96,11 @@ export default async function routingHandler(
96
97
const redirect = handleRedirects(internalEvent, RoutesManifest.redirects);
98
if (redirect) {
99
+ // We need to encode query params in the Location header to make sure it is valid according to RFC
100
+ // https://stackoverflow.com/a/7654605/16587222
101
+ redirect.headers.Location = new URL(
102
+ redirect.headers.Location as string,
103
+ ).href;
104
debug("redirect", redirect);
105
return redirect;
106
}
0 commit comments