apache / trafficcontrol

Apache Traffic Control is an Open Source implementation of a Content Delivery Network
https://trafficcontrol.apache.org/
Apache License 2.0
1.02k stars 339 forks source link

Add Forwarded HTTP header for TP proxy and logs #7289

Open jhg03a opened 1 year ago

jhg03a commented 1 year ago

This Improvement request (usability, performance, tech debt, etc.) affects these Traffic Control components:

Current behavior:

It's not possible to know from TO access logs who the client was when it's passing through the TP proxy.

New behavior:

TP should set the X-Forwarded-For HTTP header, if not already set somehow, when operating as a proxy. TO should include this in its access logs additionally so you can find client sources that pass through TP or go direct to TO.

ocket8888 commented 1 year ago

The standard header for containing that kind of information is Forwarded - described in RFC7239 Section 4 - and should probably be used instead of, or at least in addition to the non-standard X-Forwarded-For header.