Skip to content

Commit 380c5c2

Browse files
committed
Merge pull request #5 from alexpopero/issue-4
[ISSUE-4] Successful request validation quits access phase
2 parents 6e1f05f + 1e3f3ff commit 380c5c2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lua/api-gateway/validation/factory.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ end
5353
-- It calls an internal /validate-request path which can provide any custom implementation for request validation
5454
local function _validateRequest()
5555
if (ngx.var.request_method == 'OPTIONS') then
56-
return ngx.exit(ngx.OK);
56+
return ngx.OK;
5757
end
5858

5959
local res = ngx.location.capture("/validate-request", { share_all_vars = true });
@@ -64,7 +64,7 @@ local function _validateRequest()
6464
end
6565

6666
if res.status == ngx.HTTP_OK then
67-
return ngx.exit(ngx.OK);
67+
return ngx.OK;
6868
end
6969

7070
if res.status == ngx.HTTP_FORBIDDEN or res.status == ngx.HTTP_UNAUTHORIZED or res.status == ngx.HTTP_BAD_REQUEST or tonumber(res.status) > 599 then

0 commit comments

Comments
 (0)