-
-
Notifications
You must be signed in to change notification settings - Fork 310
Disable Script on specific paths locations
Conor McKnight edited this page May 5, 2026
·
4 revisions
To disable the script inside location blocks or server blocks for specific urls / domains all you can do so with the following.
These locations you apply this to will have no protection from the script.
location = /testing {
access_by_lua 'return'; #disable anti-ddos script on this location
}
location /path/testing {
access_by_lua 'return'; #disable anti-ddos script on this location
}
### etc add your other locations and check nginx docs for regex examples like this
# Exact match - highest priority, no further matching
#location = /images {
# Prefix match that stops regex evaluation
#location ^~ /images {
# Case-sensitive regex
#location ~ \.(jpg|png|gif)$ {
# Case-insensitive regex
#location ~* \.(jpg|png|gif)$ {