I have added a redirect:
From: http://localhost:3000/en/third-testpage
To: http://localhost:3000/en/second-testpage
When i visit http://localhost:3000/en/second-testpage I get sent to the 404 page because the redirect plugin fails to find the corresponding redirect. When I log the redirects object I can see that localhost is capitalized as Localhost (see image).
Here are my console.log´s placed:
/* This component helps us with SSR based dynamic redirects */
export const PayloadRedirects: React.FC<Props> = async ({ disableNotFound, url }) => {
const redirects = await getCachedRedirects()()
// console.log(url);
console.log('redirects', redirects);
const redirectItem = redirects.find((redirect) => redirect.from === url)
console.log('redirecteditem', redirectItem);
...
I just upgraded from Paylod v.3.9.0 to v3.15.0, but the problem was there before. And yes, I have doublechecked that I myself didn´t capitalize the url. Has anyone ran into this problem?