Skip to content

Commit

Permalink
improve gallery redirect with express
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Jul 9, 2024
1 parent 51cb1c3 commit 4d57df5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
9 changes: 0 additions & 9 deletions gallery.html

This file was deleted.

5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ app.get("/addon/", (req, res, next) => {
next();
});

app.get("/gallery*", (req, res) => {
// redirect everything after the slash (so ?show urls still work)
res.redirect(`https://webapp.faithfulpack.net${req.originalUrl}`);
})

app.get("/addons/", (req, res, next) => {
if (req.url == "/addons/") {
req.url = "/addons";
Expand Down

0 comments on commit 4d57df5

Please sign in to comment.