Okay, I did a little more digging into the issue and I think I've narrowed down the problem a little more. FYI I'm running nginx 1.23.3 So my location matchs are fine and working as expected. I even have an "if" statement within said location and it works as expected... if ($invalid_referer) { return 403; } But then I started to experiment with add_header within the locationby Jas0n - Nginx Mailing List - English
I think I've found a bug (or I've just been staring at code too long) regarding proxy_cache_bypass and possibly proxy_no_cache. Essentially my config is something like this below. At the top server level caching only occurs for guests (no userid cookie set), while connections that have a userid cookie set get bypassed (and also it won't save those requests to a cache). I have a specific folderby Jas0n - Nginx Mailing List - English