Skip to content

Commit 9e77882

Browse files
committed
Adjust position of ip
1 parent f2acf88 commit 9e77882

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ function hashKeyMiddlewareWrapper (options = {
5252
err.name = 'E_ACCESS_DENIED';
5353
err.statusCode = 403;
5454

55+
res.locals.ip = ip;
5556
if (decodedKey.length < 2) {
5657
next(err);
5758
return;
@@ -67,7 +68,6 @@ function hashKeyMiddlewareWrapper (options = {
6768

6869
res.locals.userId = decodedKey[0];
6970
res.locals.hashKey = hashKey;
70-
res.locals.ip = ip;
7171
next();
7272
};
7373
};

0 commit comments

Comments
 (0)