jp-gouin commented on pull request #3691:
URL: https://github.com/apache/apisix/pull/3691#issuecomment-790444760


   I made the following update : 
   `blacklist` , `whitelist` and `allowed_by_methods` can be set at the same 
time.
   `blacklist` has the priority over `whitelist` and  `whitelist` has the 
priority over `allowed_by_methods`.
   
   There is now a direct reject of the connection if the user is blacklisted
   ```
   if conf.blacklist and #conf.blacklist > 0 then
           if is_include(value, conf.blacklist) then
               return reject(conf)
           end
       end
   ```
   
   `allowed_by_methods` is only performed if the user is not whitelisted 
   ```
    if conf.allowed_by_methods and #conf.allowed_by_methods > 0 and not 
whitelisted then
           if not is_method_allowed(conf.allowed_by_methods, method, value) then
               block = true
           end
       end
   ```
   The overall behavior stay the same is you set only `blacklist` and or 
`whitelist` 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to