tempesta icon indicating copy to clipboard operation
tempesta copied to clipboard

Only the first location uses the default frang configuration.

Open biathlon3 opened this issue 1 year ago • 1 comments

Motivation

Only the first location uses the default frang configuration, and the rest use the empty frang configuration if frang_limits is absent in global part of config file before vhosts and locations.

Before implementation #2078 everything is allowed, after implementation everything will be forbidden for the second and next locations.

Scope

With this configuration only location suffix ".jpg" will use default frang configuration

listen 80;
listen 443 proto=h2;
server 127.0.0.3:8000;
cache 2;

vhost default {
    proxy_pass default;
    tls_match_any_server_name;
    tls_certificate /tmp/tempesta/tempesta.crt;
    tls_certificate_key /tmp/tempesta/tempesta.key;
    
    location suffix ".jpg" {
        proxy_pass default;
        cache_fulfill * *;
    }

    location prefix "/bypassed" {
        proxy_pass default;
        cache_bypass * *;
    }

    location prefix "/nonidempotent" {
        proxy_pass default;
        cache_fulfill * *;
        nonidempotent GET * *;
        nonidempotent HEAD * *;
        nonidempotent POST * *;
    }
}

Testing

cache.test_cache.TestCacheLocationH2.test_prefix_bypassed fails on PR#2078

biathlon3 avatar May 14 '24 08:05 biathlon3

#2121 seems a generalization of this issue

krizhanovsky avatar May 15 '24 14:05 krizhanovsky