Move set_metric misplaced in misc plugin

This commit is contained in:
Théophile Diot 2024-02-20 17:43:24 +01:00
parent fe14c7b7f4
commit 9f168f1aeb
No known key found for this signature in database
GPG key ID: 248FEA4BAE400D06

View file

@ -23,10 +23,10 @@ function misc:access()
-- Check if method is allowed
for allowed_method in self.variables["ALLOWED_METHODS"]:gmatch("[^|]+") do
if method == allowed_method then
self:set_metric("counters", "failed_method", 1)
return self:ret(true, "method " .. method .. " is allowed")
end
end
self:set_metric("counters", "failed_method", 1)
return self:ret(true, "method " .. method .. " is not allowed", HTTP_NOT_ALLOWED)
end