<div dir="ltr">Hello<div>Thank You for the help<br>I made some errors in my checks and confirm it is doing the job</div><div>Thank You</div><div>Vincent</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 17, 2021 at 1:16 AM Francis Daly <<a href="mailto:francis@daoine.org">francis@daoine.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, Jan 16, 2021 at 07:11:54PM +0100, Vincent Blondel wrote:<br>
<br>
Hi there,<br>
<br>
> We want nginx to remove the request header Cache-Control before to proxy<br>
> the request to the OCS.<br>
> We do like this ...<br>
<br>
'proxy_set_header Cache-Control "";' appears to work for me.<br>
<br>
Can you show one request to nginx with the header, and the matching<br>
request to the upstream server?<br>
<br>
When I use this config:<br>
<br>
==<br>
server {<br>
listen 7000;<br>
add_header X-7000 "cache :$http_cache_control:";<br>
location /a {<br>
proxy_set_header Cache-Control "";<br>
proxy_pass <a href="http://127.0.0.1:7001" rel="noreferrer" target="_blank">http://127.0.0.1:7001</a>;<br>
}<br>
location /b {<br>
proxy_pass <a href="http://127.0.0.1:7001" rel="noreferrer" target="_blank">http://127.0.0.1:7001</a>;<br>
}<br>
}<br>
<br>
server {<br>
listen 7001;<br>
add_header X-7001 "cache :$http_cache_control:";<br>
location / {<br>
return 200 "7001: $request_uri\n";<br>
}<br>
}<br>
==<br>
<br>
if I make a request to port 7000 that starts with /b and includes a<br>
Cache-Control header, I see in the X-7001 response header that that same<br>
Cache-Control header was sent to the upstream; but if I make a request<br>
that starts with /a, I see in the X-7001 response header that it was<br>
removed before the request was made to the upstream.<br>
<br>
That is:<br>
<br>
curl -i -H Cache-control:no-cache <a href="http://127.0.0.1:7000/b1" rel="noreferrer" target="_blank">http://127.0.0.1:7000/b1</a><br>
<br>
includes<br>
<br>
X-7001: cache :no-cache:<br>
X-7000: cache :no-cache:<br>
<br>
while<br>
<br>
curl -i -H Cache-control:no-cache <a href="http://127.0.0.1:7000/a1" rel="noreferrer" target="_blank">http://127.0.0.1:7000/a1</a><br>
<br>
includes<br>
<br>
X-7001: cache ::<br>
X-7000: cache :no-cache:<br>
<br>
Does your system respond differently?<br>
<br>
f<br>
-- <br>
Francis Daly <a href="mailto:francis@daoine.org" target="_blank">francis@daoine.org</a><br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div>