When configuring next.config.ts
redirects as follows, and you visit /about?param=test%2F%2F
the resultant Location header has the query parameter decoded, which produces an error in Cloudfront.
This worked correctly up until v3.5.5 according to my research, from v3.5.6 onwards this is reproducible, including v3.7.2. Also tested v3.6.3 which includes #871, directly tackling this issue, but no luck.
import type { NextConfig } from "next";
const nextConfig: NextConfig = {
async redirects() {
return [
{
source: "/about",
destination: "/",
permanent: false,
},
];
},
};
export default nextConfig;