mirror of
https://github.com/diced/zipline.git
synced 2025-12-12 07:40:45 -08:00
fix: add /r/:id redirect (#882)
This commit is contained in:
@@ -133,6 +133,11 @@ async function main() {
|
||||
}
|
||||
}
|
||||
|
||||
server.get<{ Params: { id: string } }>('/r/:id', async (req, res) => {
|
||||
console.log('redirecting /r/:id to /raw/:id');
|
||||
return res.redirect('/raw/' + req.params.id, 301);
|
||||
});
|
||||
|
||||
server.get<{ Params: { id: string } }>('/view/:id', async (_req, res) => {
|
||||
return res.ssr('view');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user