tianji icon indicating copy to clipboard operation
tianji copied to clipboard

Website Visitor Country

Open MiranoVerhoef opened this issue 2 months ago • 1 comments

Hello,

I'm wondering what header information the Country list is using.

Header: Remote_addr can be a bit weird where in a proxy envoiremnt could cause false positives.

Would be nice to use CF-Connecting-IP and or X-Forwarded-For

MiranoVerhoef avatar Nov 06 '25 11:11 MiranoVerhoef

sure, tianji is using cf-connecting-ip, and also using much header like x-forwarded-for and much header which provided by request-ip package

here is source code, feel free to check it

https://github.com/msgbyte/tianji/blob/e2d1a07f96b7b44e40e0da58b514956067c95144/src/server/utils/detect.ts#L65-L79

moonrailgun avatar Nov 11 '25 14:11 moonrailgun