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