// (example using hono)
app.use('/*', async (c, next) => {
const url = new URL(c.req.url);
const urlPath = url.pathname;
if (urlPath === '/a) {
// i want to return a different file
return c.env.ASSETS.fetch('/b.html');
}
return next();
})
// (example using hono)
app.use('/*', async (c, next) => {
const url = new URL(c.req.url);
const urlPath = url.pathname;
if (urlPath === '/a) {
// i want to return a different file
return c.env.ASSETS.fetch('/b.html');
}
return next();
})