You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/09 11:50:51 UTC

[GitHub] [apisix-ingress-controller] hxcGit opened a new issue, #1010: request help: how to setup plugin ua-restriction

hxcGit opened a new issue, #1010:
URL: https://github.com/apache/apisix-ingress-controller/issues/1010

   ### Issue description
   
   I want to try ua-restriction plugin. I followed the guide(https://github.com/apache/apisix-ingress-controller/blob/master/docs/en/latest/deployments/minikube.md) and installed Ingress APISIX on Kind. And I followed ua-restriction's guide(https://github.com/apache/apisix/blob/master/docs/en/latest/plugins/ua-restriction.md) to setup the plugin. But I got a "Connection refused" error.
   
   ### My steps
   1. 
   ```
   kubectl create ns ingress-apisix
   helm install apisix apisix/apisix \
     --set gateway.type=NodePort \
     --set ingress-controller.enabled=true \
     --namespace ingress-apisix \
     --set ingress-controller.config.apisix.serviceNamespace=ingress-apisix
   ```
   2. 
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/index.html",
       "upstream": {
           "type": "roundrobin",
           "nodes": {
               "127.0.0.1:1980": 1
           }
       },
       "plugins": {
           "ua-restriction": {
                "bypass_missing": true,
                "allowlist": [
                    "my-bot1",
                    "(Baiduspider)/(\\d+)\\.(\\d+)"
                ],
                "denylist": [
                    "my-bot2",
                    "(Twitterspider)/(\\d+)\\.(\\d+)"
                ]
           }
       }
   }'
   ```
   
   ### other information
   ![image](https://user-images.githubusercontent.com/60642406/167402891-3b01b305-81be-4927-8d1e-b4e78709bcbc.png)
   ![image](https://user-images.githubusercontent.com/60642406/167402927-123ec7fe-8c23-4127-b831-a30af1bbb3a7.png)
   
   
   ### Environment
   
   - APISIX version:apisix:2.13.1-alpine;apisix-ingress-controller :apisix-ingress-controller:1.4.0
   - Kubernetes version: v1.23.4
   - OS version (uname -a): Linux ubuntu 5.15.0-27-generic amd64
   


-- 
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: notifications-unsubscribe@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] hxcGit closed issue #1010: request help: how to setup plugin ua-restriction

Posted by GitBox <gi...@apache.org>.
hxcGit closed issue #1010: request help: how to setup plugin ua-restriction
URL: https://github.com/apache/apisix-ingress-controller/issues/1010


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-ingress-controller] tao12345666333 commented on issue #1010: request help: how to setup plugin ua-restriction

Posted by GitBox <gi...@apache.org>.
tao12345666333 commented on issue #1010:
URL: https://github.com/apache/apisix-ingress-controller/issues/1010#issuecomment-1121275087

   you should run `curl` command in Apache APISIX 's container


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org