Welcome! Log In Create A New Profile

Advanced

nginx proxy and Date header

Frank Liu
May 22, 2019 01:32PM
Is there a reason why by default nginx doesn't pass the "Date" header from
upstream?
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_hide_header

https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html seems to indicate
Date header shouldn't be altered:

The HTTP-date sent in a Date header SHOULD NOT represent a date and time
subsequent to the generation of the message. It SHOULD represent the best
available approximation of the date and time of message generation, unless
the implementation has no means of generating a reasonably accurate date
and time. In theory, the date ought to represent the moment just before the
entity is generated. In practice, the date can be generated at any time
during the message origination without affecting its semantic value.

If nginx, as a proxy, changes the Date header, it may mess up the caching
model of HTTP in some pretty subtle ways in the downstream.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx proxy and Date header

Frank Liu May 22, 2019 01:32PM

Re: nginx proxy and Date header

Maxim Dounin May 23, 2019 05:56AM

Re: nginx proxy and Date header

Frank Liu May 23, 2019 12:44PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 186
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready