0

Access must be denied to the site from the Firefox and Chrome user agents , but if ip adress = 44.221.341.44 and 44.221.342.33 allow and if http-refer = test.com , test.nl , test.de - allow too

i think that to block the agent i have to :

    if ($http_user_agent ~ (Firefox|Chrome)) {
        return 403;
    }

it works

but I don't know how to allow the necessary IP addresses

so i try

if ($remote_addr != XXX.XXX.XXX.XXX) {
        set $test A;
}

if ($http_user_agent ~* (python-requests)) {
        set $test "${test}B";
}

if ($test = AB) {
        return 444;
}

but how i can add here if http-refer = test.com , test.nl , test.de - allow

0 Answers0