Chocolate
Chocolate

Reputation: 444

Perl - How to find out whether a request was made via proxy?

My question is, if its possible to find out whether a request was made via proxy or not? Is there an environment variable i can use? I looked through some lists of environment variables and didn't find something useful. Or do i have to directly read the http header for this purpose? E.g. As long as the 'via' field is empty no proxy was used? Would be thankful if someone got an easy solution for this in perl.

May you have other advices to verify a user and block/filter requests that are fake visitors.

Upvotes: 0

Views: 78

Answers (1)

Steffen Ullrich
Steffen Ullrich

Reputation: 123340

First, use of a proxy does not mean the user is fake. It is very common inside companies to use a proxy server for security purposes. Second, not all proxy servers add a Via header so a request from a proxy might be no different than a request from the browser itself.

Upvotes: 1

Related Questions