Custom HTTP Header

Ben Lancaster benlancaster at
Mon Aug 1 14:04:00 UTC 2011

> On Mon, Aug 01, 2011 at 03:48:13PM +0200, John Macleod wrote:
>> Is it possible to add a custom http header that identifies the 
>> nginx server that handled the connection?
>> I have noticed a couple CDNs do this, on adds a CF1: xxXX:xxXX 
>> location/node descriptor that shows with a curl -I
>> Or is there another way to do this?

….and then you can use the variables from, e.g.

add_header X-Backend $upstream_addr;

More information about the nginx mailing list