mhh12121 commented on issue #1235:
URL: 
https://github.com/apache/apisix-ingress-controller/issues/1235#issuecomment-1210427606

   @tokers @tao12345666333  
   Maybe I OMIT something, I also have another apisixroute routing to the same 
service: backend
   
   I tried to combine them together into single one apisixroute as following:
   
   ```
   apiVersion: apisix.apache.org/v2beta3
   kind: ApisixRoute
   metadata:
     name: route-backend
     namespace: default
   spec:
     http:
     - name: a
       match:
         paths:
         - /api/*
       backends: 
       - serviceName: backend
         servicePort: 80
         resolveGranularity: service
       plugins:
       - name: proxy-rewrite
         enable: true
         config: 
           regex_uri: ["^/api/(.*)","/$1"]
       - name: forward-auth
         enable: true
         config:
           uri: "http://auth.default.svc.cluster.local:1234/auth";
           request_headers: ["Authorization"]
           upstream_headers: ["user-id"]
           client_headers: ["Location"]
     - name: b
       match: 
         paths:
         - /openapi.json
         - /static/*
         methods:
         - GET    
       backends: 
       - serviceName: backend
         servicePort: 80
         resolveGranularity: service
     - name: c
       match:
         paths:
         - /backend_docs
         methods:
         - GET
       backends: 
       - serviceName: backend
         servicePort: 80
         resolveGranularity: service
       plugins:
       - name: proxy-rewrite
         enable: true
         config: 
           uri: "/docs"
   ```
   So to conclude we have three http proxy rules now:
   - a
   - b
   - c
   
   And the result is kinda weird....
   
   Both of the route rules **a** and **b**  work as expected, but  **c** not 
work... And I check my service logs, it seems that **c** also  passed through 
forward-auth !
   
   
   


-- 
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]

Reply via email to