slotlist / slotlist-backend

Backend of slotlist.info, an ArmA 3 mission planning and slotlist management tool
https://slotlist.info
MIT License
13 stars 6 forks source link

Parse visitor's IP from Cloudflare CF-Connecting-IP or X-Forwarded-For headers #7

Closed MorpheusXAUT closed 7 years ago

MorpheusXAUT commented 7 years ago

Current logging only includes the local Docker/traefik IP, which makes the information useless. For better monitoring and logging, the visitor's real IP has to be parsed from the Cloudflare headers provided.

CF provides a CF-Connecting-IP header containing the visitor's "real" IP, which could be used to overwrite the remoteAddress of Hapi requests. Alternatively, the X-Forwarded-For header could be parsed, e.g. using packages like forwarded or therealyou.


Tasks