fix: Basic auth plugin should run in rewrite phase. (#2905)

This commit is contained in:
Jens Keiner 2020-12-01 16:03:45 +01:00 committed by GitHub
parent ddfeb5de1d
commit c140d0eddc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View File

@ -125,7 +125,7 @@ do
end
end
function _M.access(conf, ctx)
function _M.rewrite(conf, ctx)
core.log.info("plugin access phase, conf: ", core.json.delay_encode(conf))
-- 1. extract authorization from header

View File

@ -198,6 +198,8 @@ Authorization: Basic Zm9vOmJhcg==
hello world
--- no_error_log
[error]
--- error_log
find consumer foo