Link to the code that reproduces this issue https://github.com/vercel/redirect-reproduction To Reproduce Actual Navigate to localhost:3000/test See error below ⨯ TypeError: Failed to parse URL from /test at Response.redirect (node:intern...
module.exports={// ...rewrites(){return{fallback:[{source:"/:path*",destination:"/not-found",locale:false,},],};}}; EDIT: To make it respond with 404, add getServerSideProps() to the custom error page and make it return{ notFound: true } ...
With a little hack around exporting config and withAuth and boom It's working for me import { withAuth } from "next-auth/middleware" export const config = { matcher: ["/dashboard/:path*"] } export default withAuth({}) doesn't work for me, it all returns 307 Temporary Redirect with...
Since 307 redirects instruct the browser not to change the method (seehttps://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307), if you did a POST to your API then the redirect will also POST to the redirect. In this case the origin S3 does not allow POST so it will fail. I ...