Skip to content

Commit

Permalink
log IP address fix
Browse files Browse the repository at this point in the history
  • Loading branch information
canbax committed Aug 1, 2023
1 parent 0d7aa6e commit f013b7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,9 @@ function getIPAdress(req: Request, res: Response) {
res.send({ IP: req.headers["x-forwarded-for"] });
}

function logIPAdress(req: Request) {
function logIPAdress(req: Request, _: Response, next: NextFunction) {
console.log("IP address:", req.headers["x-forwarded-for"]);
next();
}

function getTotalVisitCount(_: Request, res: Response) {
Expand Down
2 changes: 1 addition & 1 deletion api/total-visit-count.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0
24

1 comment on commit f013b7e

@vercel
Copy link

@vercel vercel bot commented on f013b7e Aug 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

namaz-vakti-api – ./

namaz-vakti-api-git-main-canbax.vercel.app
namaz-vakti.vercel.app
namaz-vakti-api-canbax.vercel.app

Please sign in to comment.