[GitHub] [apisix-ingress-controller] brighten1023 commented on issue #784: request help: regex_uri in proxy-rewriter

2022-03-31 Thread GitBox


brighten1023 commented on issue #784:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/784#issuecomment-1084672847


   I almost forgot this issue. The problem was solved by reinstalling the whole 
apisix and ingress controller, as well as the problem should be related to etcd 
cluster. This issue can be closed. Many thanks!


-- 
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-unsubscr...@apisix.apache.org

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




[GitHub] [apisix-ingress-controller] brighten1023 commented on issue #784: request help: regex_uri in proxy-rewriter

2021-12-06 Thread GitBox


brighten1023 commented on issue #784:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/784#issuecomment-987523094


   `apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
 name: frontend-route
   spec:
 http:
 - name: frontend
   match:
 hosts:
 - test.aaa.com
 paths:
 - /*
   backends:
  - serviceName: frontend
servicePort: 80
   plugins:
  - name: proxy-rewrite
enable: true
config:
  regex_uri: ["^/(.*)", "/$1"]` 
   `apiVersion: apisix.apache.org/v2beta2
   kind: ApisixRoute
   metadata:
 name: backend-route
   spec:
 http:
 - name: backend
   match:
 hosts:
 - test.aaa.com
 paths:
 - /api/*
   backends:
  - serviceName: backend
servicePort: 8080
   plugins:
  - name: proxy-rewrite
enable: true
config:
  regex_uri: ["^/api/(.*)$", "/api/$1"]`
   Temporarily, I use apisix dashboard to create route and upstream, and it 
goes well
   `//route frontend
   {
 "uri": "/*",
 "name": "frontend_route",
 "methods": [
   "GET",
   "POST",
   "PUT",
   "DELETE",
   "PATCH",
   "HEAD",
   "OPTIONS",
   "CONNECT",
   "TRACE"
 ],
 "plugins": {
   "proxy-rewrite": {
 "regex_uri": [
   "^/(.*)",
   "/$1"
 ]
   }
 },
 "upstream_id": "384232553139143705",
 "status": 1
   }`
   `//route backend
   {
 "uri": "/api/*",
 "name": "backend_route",
 "methods": [
   "GET",
   "POST",
   "PUT",
   "DELETE",
   "PATCH",
   "HEAD",
   "OPTIONS",
   "CONNECT",
   "TRACE"
 ],
 "plugins": {
   "proxy-rewrite": {
 "regex_uri": [
   "/api/(.*)",
   "/api/$1"
 ]
   }
 },
 "upstream_id": "384236511421269017",
 "status": 1
   }`
   


-- 
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-unsubscr...@apisix.apache.org

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