Skip to content

Commit

Permalink
🌐 Forward Heroku to GitHubJobs.io #46 - Log referrer
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlee-dev committed Aug 6, 2020
1 parent 6f52512 commit 51f15b5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/server/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,8 @@ class App {

this.app.get("*", (req: Request, res: Response) => {
console.log({ hostname: req.hostname });
if (req.hostname === "herokuapp") {
return res.status(308).redirect("https://www.githubjobs.io/");
}
console.log({ referrer: req.headers.referer });
// return res.status(301).redirect("https://www.githubjobs.io/");
res.sendFile(path.join(__dirname, "../dist/index.html"));
});
}
Expand Down

0 comments on commit 51f15b5

Please sign in to comment.