Welcome! Log In Create A New Profile

Advanced

Proxy Caching ignore path

August 06, 2019 10:27AM
I have a situation where I need to enable proxy cache for a gateway but anything that goes to /gateway/public/files/ I do not want to cache. I have tried nested locations and all kinds of configurations with no success. It usually lands up with 404 errors on /gateway/public/files/ the complete url includes a file reference like so /gateway/public/files/kd774831ldja3

caching is working for anything going to /gateway/

location /gateway/ {
proxy_cache gateway_cache;
proxy_cache_valid 200 302 10m;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_hide_header Access-Control-Allow-Origin;
add_header 'Access-Control-Allow-Origin' '*' always;
rewrite ^/gateway/(.*) /$1 break;
proxy_pass $elb;
}
Subject Author Posted

Proxy Caching ignore path

jvanetten August 06, 2019 10:27AM

Re: Proxy Caching ignore path

itpp2012 August 06, 2019 11:27AM

Re: Proxy Caching ignore path

jvanetten August 06, 2019 12:12PM

Re: Proxy Caching ignore path

itpp2012 August 06, 2019 04:04PM

Re: Proxy Caching ignore path

Francis Daly August 07, 2019 03:16AM

Re: Proxy Caching ignore path

Francis Daly August 07, 2019 03:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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