Skip to content
Ip Displayer
Profile icon
GatewayDuckYT

Ok so i want to display someone's ip with out logging it, or giving it to anyone can i do this

You are viewing a single comment. View All
Profile icon
CodingCactus

yes, but only on the frontend, just google something like "how to get user's ip frontend js"

Profile icon
Crosis

@CodingCactus Is it ok if I get peoples ip but hash it first for IP bans? (this way I can't even see their IP)

Profile icon
RahulChoubey1

@CodingCactus frontend vs backend?

Profile icon
CodingCactus

@Crosis yes, as long as the user agrees to this (put it in your site privacy policy)

Profile icon
Crosis

@CodingCactus Ok, thank you!

Profile icon
GatewayDuckYT

@CodingCactus can repl kill me for it?

Profile icon
CodingCactus

@GatewayDuckYT you need to make it extremely clear to the user that it is storing their ip. They must accept it (like agreeing to your privacy policy in which you state that you will use their ip, or pressing a button saying that it will give consent for you to us either ip).