Welcome! Log In Create A New Profile

Advanced

Re: Howto Remove the Cache-Control request header.

Vincent Blondel
January 19, 2021 12:04PM
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 <francis@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 francis@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
Subject Author Posted

Howto Remove the Cache-Control request header.

Vincent Blondel January 16, 2021 01:14PM

Re: Howto Remove the Cache-Control request header.

Thomas Ward January 16, 2021 01:16PM

Re: Howto Remove the Cache-Control request header.

Vincent Blondel January 16, 2021 01:22PM

Re: Howto Remove the Cache-Control request header.

Francis Daly January 16, 2021 07:18PM

Re: Howto Remove the Cache-Control request header.

Vincent Blondel January 19, 2021 12:04PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
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