@justair/justair-library 6.11.0-alpha.7147af7 → 6.11.0
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passwordResetToken.test.d.ts","sourceRoot":"","sources":["../../../src/models/tests/passwordResetToken.test.js"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requestContext.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/requestContext.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,oCAJW;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,MAAS;IAAC,MAAM,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,UACtE,MAAM,GACJ;IAAE,EAAE,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"requestContext.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/requestContext.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,oCAJW;IAAE,EAAE,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,MAAS;IAAC,MAAM,CAAC,EAAE;QAAE,aAAa,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,UACtE,MAAM,GACJ;IAAE,EAAE,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,GAAC,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAYjF"}
|
package/package.json
CHANGED
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export function requestContext(req, source) {
|
|
15
15
|
return {
|
|
16
|
+
// x-forwarded-for is the raw, client-spoofable header (and may be a
|
|
17
|
+
// comma-separated proxy chain). It is captured as-is for audit metadata
|
|
18
|
+
// only — NOT a trust boundary. Never key a security decision off ctx.ip
|
|
19
|
+
// without parsing the trusted left-most hop yourself.
|
|
16
20
|
ip: req?.ip ?? req?.headers?.['x-forwarded-for'] ?? req?.socket?.remoteAddress,
|
|
17
21
|
userAgent: req?.headers?.['user-agent'],
|
|
18
22
|
source,
|