Skip to content

Commit

Permalink
fix case of options.
Browse files Browse the repository at this point in the history
method names are in lowercase in lua code. Don't ask why. That's what ngx.ctx.request_method gives us
  • Loading branch information
phanimahesh authored Oct 17, 2018
1 parent d4605a6 commit 5821dfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api-umbrella/proxy/middleware/api_settings.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ return function(api)
-- Add some defaults for OPTIONS
-- See https://github.com/apinf/platform/issues/3531
local request_method = ngx.ctx.request_method
if(request_method == "OPTIONS") then
if(request_method == "options") then
settings["disable_api_key"] = true
end

Expand Down

1 comment on commit 5821dfb

@ilarimikkonen
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/

Please sign in to comment.