What is the difference between HTTP_X_FORWARDED_FOR and HTTP_FORWARDED

I was looking for a way to find the client IP address, and I found both of these HTTP headers. From what I found, they are one and the same, but HTTP_X_FORWARDED_FOR is more widely used. Do any of you know what the difference is, and if I need to check both of them? Thank.

+5
source share
1 answer

X-Forwarded-Forthe header is not part of the RFC, therefore, differs in the implementation of proxies. You should not rely on this value because it may be tampered with or just not sent a proxy.

If this is important, and you can afford to do this, you must force requests through HTTPS and search REMOTE_ADDR.

+5
source

All Articles