GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( a4dd04...878efe )
by Vladimir
41s
created

request.js ➔ ???   A

Complexity

Conditions 1
Paths 4

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
c 1
b 0
f 0
nc 4
dl 0
loc 4
rs 10
nop 1
1
/**
2
 * Request service.
3
 *
4
 * Here you can find helpful methods to interact with request object.
5
 */
6
const request = {};
7
8
/**
9
 * Gets ip address from request object.
10
 *
11
 * @param {Object} req HTTP request.
12
 */
13
request.getIp = req => req.headers['x-forwarded-for']
14
  || req.connection.remoteAddress
15
  || req.socket.remoteAddress
16
  || req.connection.socket.remoteAddress;
17
18
module.exports = request;
19