Skip to content

Commit

Permalink
moves get_method function after conditional check
Browse files Browse the repository at this point in the history
  • Loading branch information
kevprice83 authored and eloycoto committed Jan 20, 2021
1 parent c73a16c commit 9c1c7ed
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@ end
-- Returns true if no Method is provided in the config for backwardscompatibility
local function is_match_methods(methods)

local request_method = ngx.req.get_method()

if methods == nil or next(methods) == nil then
return true
end

local request_method = ngx.req.get_method()

for _,v in pairs(methods) do
if v == request_method then
return true
Expand Down

0 comments on commit 9c1c7ed

Please sign in to comment.