vitedge icon indicating copy to clipboard operation
vitedge copied to clipboard

Props redirect issue

Open frandiox opened this issue 4 years ago • 0 comments

From Discord via @subhendukundu:

Lets say I have these routes.

functions/props/docs/[slug].js and functions/props/docs.js

and in /docs.js

export default {
    handler({ params = {}, query = {} }) {
        return {
            status: 302, // Any 3xx is accepted for a redirect
            headers: {
                location: "/docs/getting-started",
            },
        };
    },
    options: {
        cache: {
            api: 90,
            html: 90,
        },
    },
};

And this is affecting in docs/[slug] paths as well.

yes. I have two routes.

  1. /docs
  2. docs/[slug] And I am trying to redirect user from /docs to /docs/getting-started

git clone -b props-route https://github.com/subhendukundu/vitedge-react-template.git

frandiox avatar Jul 28 '21 10:07 frandiox