Commit debbc65a184febc31b127e160ad03eb05c29b242
1 parent
fa9f83e2c9
Exists in
master
and in
1 other branch
Ping
Showing 1 changed file with 15 additions and 0 deletions Side-by-side Diff
lib/partner-listener/index.js
... | ... | @@ -18,6 +18,21 @@ app.use(express.json({ extended: true })); |
18 | 18 | app.use(express.urlencoded({ extended: true })); |
19 | 19 | app.use(middlewareCommon); |
20 | 20 | |
21 | +app.use('/ping', (req, res) => { | |
22 | + res.json({ | |
23 | + error: false, | |
24 | + xid: res.locals.xid, | |
25 | + from_ip: req.ip, | |
26 | + ts: new Date(), | |
27 | + request: { | |
28 | + method: req.method, | |
29 | + userAgent: req.get('user-agent'), | |
30 | + contentType: req.get('content-type'), | |
31 | + qs: req.query, | |
32 | + body: req.body, | |
33 | + }, | |
34 | + }); | |
35 | +}); | |
21 | 36 | app.use('/inquiry', routerInquiry); |
22 | 37 | app.use('/pay', routerPay); |
23 | 38 | app.use('/topup', routerTopup); |