Custom HTTP Header

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?

Thanks!

John

Hello!

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?

Maxim D.

GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub
.and then you can use the variables from
GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub, e.g.

add_header X-Backend $upstream_addr;