コミット
c7d6380fdb
|
@ -53,6 +53,11 @@ app.get("/a/:id", slow, limiter, (req, res) => {
|
|||
res.redirect(301, `https://asmhentai.com/g/${req.params.id}`);
|
||||
});
|
||||
|
||||
app.get("/to/:id", slow, limiter, (req, res) => {
|
||||
if (!isNumeric(req.params.id)) throw Error("This path need required number to work");
|
||||
res.redirect(301, `https://nhentai.to/g/${req.params.id}`);
|
||||
});
|
||||
|
||||
app.use((req: Request, res: Response, next: NextFunction) => {
|
||||
res.status(404);
|
||||
next(Error(`The page not found in path ${req.url} and method ${req.method}`));
|
||||
|
|
読み込み中…
新しいイシューから参照