mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 12:57:47 +00:00
Adds initial support for a root-level `middleware.js` / `middleware.ts` file in the `vercel dev` CLI command. This leverages the existing Edge Function invoking logic in `@vercel/node`'s `startDevServer()` function and applies the necessary response / rewrites / mutations to the HTTP request based on the result of the middleware invocation.
6 lines
71 B
JavaScript
6 lines
71 B
JavaScript
export default (req, res) => {
|
|
res.json({
|
|
url: req.url,
|
|
});
|
|
};
|