My classic load balancer doesn't supply the X-Forwarded-For
header occasionally, I can't say for sure whether the same request is going to have it or not.
I noticed that a request to the URL pointing to the load balancer gets proxied via either of the two IP addresses: IP A
or IP B
. As you can see in the log below, IP A
always contain the X-Forwarded-For
header and the user agent, the IP B
has neither of them. Don't pay attention to the HTTP code, it's intentionally 403 when there is no X-Forwarded-For
:
<IP A> - - [20/Apr/2018:15:04:11 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
<IP B> - - [20/Apr/2018:15:04:12 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 401 611 "-" "curl/7.47.0" <X-Forwarded-For IP>
<IP A> - - [20/Apr/2018:15:04:14 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
<IP B> - - [20/Apr/2018:15:04:15 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 401 611 "-" "curl/7.47.0" <X-Forwarded-For IP>
<IP A> - - [20/Apr/2018:15:04:16 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
<IP B> - - [20/Apr/2018:15:04:17 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 401 611 "-" "curl/7.47.0" <X-Forwarded-For IP>
<IP A> - - [20/Apr/2018:15:04:17 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
<IP B> - - [20/Apr/2018:15:04:18 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 401 611 "-" "curl/7.47.0" <X-Forwarded-For IP>
<IP A> - - [20/Apr/2018:15:04:19 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
<IP B> - - [20/Apr/2018:15:04:20 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
<IP A> - - [20/Apr/2018:15:04:21 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
<IP A> - - [20/Apr/2018:15:04:34 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
<IP B> - - [20/Apr/2018:15:04:34 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
<IP A> - - [20/Apr/2018:15:04:35 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
<IP B> - - [20/Apr/2018:15:04:36 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
<IP A> - - [20/Apr/2018:15:04:36 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 401 612 "-" "curl/7.47.0" <X-Forwarded-For IP>
<IP B> - - [20/Apr/2018:15:04:37 +0100] "GET /wc-api/v3/orders/?ttt HTTP/1.1" 403 428
What could possibly cause such a behavior?
UPDATE
Both IP A and B wipe the headers randomly, not only IP B.
UPDATE 2
The 403 HTTP errors are caused by something else, not my apache config, so they are not intentional as it's said above