shuaijinchao commented on a change in pull request #9:
URL:
https://github.com/apache/apisix-python-plugin-runner/pull/9#discussion_r686858629
##########
File path: apisix/runner/plugin/core.py
##########
@@ -14,18 +14,32 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+import os
import importlib
from pkgutil import iter_modules
-def instances() -> dict:
- modules = iter_modules(__import__("plugins").__path__)
+def filter(configs: dict, request, response) -> None:
+ for name in configs:
+ plugin = configs.get(name)
+ if not plugin:
+ print("plugin undefined.")
+ continue
+ try:
+ plugin.filter(request, response)
+ except Exception as e:
+ print(e)
Review comment:
fixed
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]