From 5821dfb781a55e81083011ea288b04127d85b4a8 Mon Sep 17 00:00:00 2001 From: J Phani Mahesh Date: Wed, 17 Oct 2018 12:54:54 +0530 Subject: [PATCH] fix case of options. method names are in lowercase in lua code. Don't ask why. That's what ngx.ctx.request_method gives us --- src/api-umbrella/proxy/middleware/api_settings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api-umbrella/proxy/middleware/api_settings.lua b/src/api-umbrella/proxy/middleware/api_settings.lua index 5587a9963..8e86d8425 100644 --- a/src/api-umbrella/proxy/middleware/api_settings.lua +++ b/src/api-umbrella/proxy/middleware/api_settings.lua @@ -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