Added log ip-masking#276
Conversation
|
Hi @nanaabdul1172 👋 — appreciate the IP-masking work for #222, the new |
Xhristin3
left a comment
There was a problem hiding this comment.
Nice feature — LOG_IP_MASKING with modes none, last-octet, full-hash covering v4/v6/v4-mapped is solid. Holding on merge because quality CI is red:\n\napi test suite has one failure:\n- RequestLoggerMiddleware › logs a 2xx request with the required fields on completion\n- the assertion expects "1.2.3.4" but now receives "1.2.3.0" — i.e. your last-octet masking is actually working, the existing test just predates it.\n\nPlease update that assertion in api/src/middleware/request-logger.middleware.spec.ts to expect the masked IP ("1.2.3.0") so it reflects the new behavior. Re-request review once CI is green 🙏
Closes #222
Added LOG_IP_MASKING env var (default: "last-octet"). Masked the last octet of IPv4 addresses and the last 64 bits of IPv6 addresses before logging or storing.