I am building a Java webserver in Karaf. I would like to know if the http call stems from the same machine ( = Is local) or not. Http headers like Referer
and Host
help me in this regard so far.
The strategy namely is to see if the appearing URL in the headers reads localhost
or not.
What are the dangers of this approach? And is there a more secure way?