Skip to content

Commit

Permalink
fix: redirect with 302 status code instead
Browse files Browse the repository at this point in the history
  • Loading branch information
arpitdalal committed Apr 20, 2024
1 parent 41b8cdd commit c2c125e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,28 +11,28 @@ const URLS = {
};

app.get("/", (_, res) => {
res.redirect(301, URLS.website);
res.redirect(URLS.website);
});

app.get("/b", (_, res) => {
res.redirect(301, URLS.blog);
res.redirect(URLS.blog);
});
app.get("/blog", (_, res) => {
res.redirect(301, URLS.blog);
res.redirect(URLS.blog);
});

app.get("/gh", (_, res) => {
res.redirect(301, URLS.github);
res.redirect(URLS.github);
});
app.get("/github", (_, res) => {
res.redirect(301, URLS.github);
res.redirect(URLS.github);
});

app.get("/in", (_, res) => {
res.redirect(301, URLS.linkedin);
res.redirect(URLS.linkedin);
});
app.get("/linkedin", (_, res) => {
res.redirect(301, URLS.linkedin);
res.redirect(URLS.linkedin);
});

app.listen(port, () => {
Expand Down

0 comments on commit c2c125e

Please sign in to comment.