@kivia/sdk 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.js +5 -5
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -55,17 +55,17 @@ class KiviaClient {
|
|
|
55
55
|
*/
|
|
56
56
|
logHono() {
|
|
57
57
|
return async (c, next) => {
|
|
58
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
58
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
59
59
|
const start = Date.now();
|
|
60
60
|
await next();
|
|
61
61
|
const latency = Date.now() - start;
|
|
62
62
|
const logEntry = {
|
|
63
63
|
path: c.req.path || c.req.url,
|
|
64
64
|
status: c.res.status,
|
|
65
|
-
ip_address: ((_b = (_a = c.req).header) === null || _b === void 0 ? void 0 : _b.call(_a, 'x-forwarded-for')) ||
|
|
66
|
-
((
|
|
67
|
-
((
|
|
68
|
-
((
|
|
65
|
+
ip_address: ((_c = (_b = (_a = c.req).header) === null || _b === void 0 ? void 0 : _b.call(_a, 'x-forwarded-for')) === null || _c === void 0 ? void 0 : _c.split(',')[0]) ||
|
|
66
|
+
((_e = (_d = c.req).header) === null || _e === void 0 ? void 0 : _e.call(_d, 'x-real-ip')) ||
|
|
67
|
+
((_h = (_g = (_f = c.req.raw) === null || _f === void 0 ? void 0 : _f.headers) === null || _g === void 0 ? void 0 : _g['x-forwarded-for']) === null || _h === void 0 ? void 0 : _h.split(',')[0]) ||
|
|
68
|
+
((_k = (_j = c.req.raw) === null || _j === void 0 ? void 0 : _j.socket) === null || _k === void 0 ? void 0 : _k.remoteAddress),
|
|
69
69
|
timestamp: new Date().toISOString(),
|
|
70
70
|
latency,
|
|
71
71
|
};
|
package/package.json
CHANGED