fix: meta.filter in plugin doesn't work in response-rewrite plugin#8162
Conversation
| return true | ||
| end | ||
|
|
||
| ctx[match_cache_key] = ok |
There was a problem hiding this comment.
I think we can't cache the result of the filter. Since we have a different phase for every plugin like "rewrite", "access" e.g.
There was a problem hiding this comment.
filter works better at the plugin level and is executed at each phase, which will increase the difficulty for users to use.
| end | ||
|
|
||
| local match_cache_key = | ||
| ctx.conf_type .. "#" .. plugin_name .. "#meta_filter_matched" |
There was a problem hiding this comment.
Does this key work with multiple global_rules? They have the same conf_type.
There was a problem hiding this comment.
Do you mean the scene where the con_type is the same and the plugin_name is different? I think my test case already contains. The conf_type is route.
There was a problem hiding this comment.
There is indeed a problem, I adjusted match_cache_key, added some test case:https://github.com/apache/apisix/pull/8162/files#diff-29e2373df60fd8fc082317d17e636b6fa17c60459c1a691c5838f36b31cc486aR532-R567
…pache#8162) Co-authored-by: soulbird <[email protected]>
* upstream/master: (94 commits) test: add test cases for ai module (apache#8222) fix(ai): typo key name (apache#8232) docs: update the docs of admin API (apache#8191) Update standalone docs for change in SSL parameter (apache#8242) fix: can not modify x-forwarded-host in proxy rewrite (apache#8200) chore: export the set cert/key process so we can hook it (apache#8228) test: add cases of ai module (apache#8214) feat: add dafault value roundrobin for upstream_schema (apache#8180) docs: update limit plugin docs (apache#8154) dix remote_addr (apache#8210) fix(zipkin): send trace IDs with a reject sampling decision (apache#8099) docs: update hmac-auth doc (apache#8192) docs: update limit count plugin doc (apache#8196) docs: fix building apisix misled (apache#8189) fix: meta.filter in plugin doesn't work in response-rewrite plugin (apache#8162) feat: release 3.0 (apache#8179) docs: refactor admin api doc (apache#8145) docs: refactor health check doc (apache#8129) docs: protect-api.md typo, remove redundant braces. (apache#8139) feat: renew route lrucache when the routes change (apache#8157) ...
…pache#8162) Co-authored-by: soulbird <[email protected]> Signed-off-by: spacewander <[email protected]>
…8162) Co-authored-by: soulbird <[email protected]> Signed-off-by: spacewander <[email protected]>
Description
Fixes #7852
Checklist