Files
directus/api
daedalus 376d279fd6 Add ip, userAgent and origin for ws activity (#25114)
* add `getIpFromReq` for `IncomingMessage`

* support `ip`,`userAgent` and `origin` for ws connection

* add changeset

* rename `getIPFromReq` to `getIPFromWSReq`

* utilize getIPFromReq

* improve `accountabilityOverrides` typing

* remove additional type defs

* simplify getIPFromReq to work with IncomingMessage always

* add tests

* update tests

* remove unnecessary ip property on req

* construct req in tests uniformly

* add express supported trust values

* improve testing to cover all `IP_PROXY_TRUST` values

* Update api/src/utils/get-ip-from-req.ts

* Enforce types instead of reassign to ensure type

* Update api/src/utils/get-ip-from-req.ts

* Add feature parity with express note

* Add more notes

* Update api/src/websocket/controllers/base.ts

Co-authored-by: Nitwel <mail@nitwel.de>

* Update api/src/websocket/controllers/base.ts

Co-authored-by: Nitwel <mail@nitwel.de>

* Remove accountability type change

---------

Co-authored-by: Brainslug <br41nslug@users.noreply.github.com>
Co-authored-by: Nitwel <mail@nitwel.de>
2025-05-21 13:48:06 +02:00
..
2025-01-02 15:37:30 +01:00