February 2018
Beginner to intermediate
348 pages
9h 40m
English
Context: location
This directive allows you to prevent the use of all HTTP methods, except the ones that you explicitly allow. Within a location block, you may want to restrict the use of some HTTP methods, such as forbidding clients from sending POST requests. You need to define two elements: first, the methods that are not forbidden (the allowed methods; all others will be forbidden); and second, the audience that is affected by the restriction:
location /admin/ {
limit_except GET {
allow 192.168.1.0/24;
deny all;
}
}
This example applies a restriction to the /admin/ location—all visitors are only allowed to use the GET method. Visitors that have a local IP address, as specified with the allow directive (detailed in the HTTP ...
Read now
Unlock full access