Caelebs opened a new issue #3913:
URL: https://github.com/apache/apisix/issues/3913


   ### Issue description
   
   I have a custom plug-in to determine whether the requested URI exists in the 
whitelist api list. In addition, there is another plugin to request the 
internal authentication service to verify whether there is permission. Now my 
approach is to enter in the request When it comes to the first plugin, I use 
`core.response.set_header("Ignore", var)` to set a header, and then determine 
the value of the header in subsequent plugins. I am not sure if there are other 
ways to do it? The method I use now doesn't seem to be very good.
   
   I have used `spring cloud gateway` before, and the practice was similar to 
now, using `serverWebExchange.getAttributes().put("ignore_access", "true");`, 
maybe apisix can have a better way? Because I always feel that it is not very 
good to transfer variables by setting the header
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): `2.4`
   * OS (cmd: `uname -a`): `CentOS Linux release 7.6.1810 (Core)`
   * OpenResty / Nginx version (cmd: `nginx -V` or `openresty -V`): 
`openresty/1.17.8.2`
   * etcd version, if have (cmd: run `curl 
http://127.0.0.1:9090/v1/server_info` to get the info from server-info API): 
`{"up_time":1869,"boot_time":1616727683,"last_report_time":1616729544,"id":"408bcb78-10dd-4958-902c-f399bc60e0fc","etcd_version":"3.4.0","hostname":"TEST3","version":"2.4"}`
   * apisix-dashboard version, if have: `2.5`
   


-- 
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:
us...@infra.apache.org


Reply via email to