Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only the first location uses the default frang configuration. #2119

Open
biathlon3 opened this issue May 14, 2024 · 1 comment
Open

Only the first location uses the default frang configuration. #2119

biathlon3 opened this issue May 14, 2024 · 1 comment
Labels
bug good to start Start form this tasks if you're new in Tempesta FW low priority
Milestone

Comments

@biathlon3
Copy link
Contributor

biathlon3 commented May 14, 2024

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

@krizhanovsky
Copy link
Contributor

#2121 seems a generalization of this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good to start Start form this tasks if you're new in Tempesta FW low priority
Projects
None yet
Development

No branches or pull requests

2 participants