Configuring URL redirects in Vercel

Hello! I’m starting out with a new project and I’m deploying to Vercel for the first time.

I’d like to have redirect to a function that returns an XML sitemap. According to Vercel’s docs, this should be possible by configuring vercel.json.

Is anyone here familiar with the Vercel deployment process and - if so - is that how you would recommend doing this? Or maybe using vercel.json would conflict with Redwood’s deploy process, and there is another way that’s more similar to the way that this is configured for Netlify deploys?

Any guidance would be much appreciated!