11apiVersion : networking.k8s.io/v1 
22kind : Ingress 
33metadata :
4-   name : shortcircuit-server-ingress 
4+   name : shortcircuit-analysis- server-ingress 
55  annotations :
66    nginx.ingress.kubernetes.io/configuration-snippet : | 
77      # our containers host at '/' so can't possibly make a difference between 
88      # '/XXX/' and '/XXX' (trailing slash) (which would respectively become 
99      # '/' and '' inside the container but an empty path doesn't exist in http) 
1010      # so always redirect '/XXX' to '/XXX/' in the client outside the container 
11-       rewrite ^/shortcircuit-server$ /shortcircuit-server/ permanent; 
11+       rewrite ^/shortcircuit-analysis- server$ /shortcircuit-analysis -server/ permanent; 
1212      # springfox swagger-ui uses X-Forwarded-Prefix to find the 
1313      # base url when behind a reverse proxy. 
1414      # nginx-ingress-controller has an annotation to do the same thing 
1515      # (nginx.ingress.kubernetes.io/x-forwarded-prefix) 
1616      # but it only works when using rewrite-target, which we can't use because 
1717      # we have properly encoded slashs in urls 
18-       proxy_set_header X-Forwarded-Prefix         /shortcircuit-server/; 
18+       proxy_set_header X-Forwarded-Prefix         /shortcircuit-analysis- server/; 
1919      # using this instead of standard rewrite as a workaround to avoid decoding slashes in urls 
2020      # we sometimes have ids in the urls that contain properly encoded slashes 
21-       if ($request_uri ~ "^/shortcircuit-server(/.*)") { 
21+       if ($request_uri ~ "^/shortcircuit-analysis- server(/.*)") { 
2222        proxy_pass http://upstream_balancer$1; 
2323        break; 
2424      } 
2525spec :
2626  rules :
2727    - http :
2828        paths :
29-           - path : /shortcircuit-server(/|$) 
29+           - path : /shortcircuit-analysis- server(/|$) 
3030            pathType : Prefix 
3131            backend :
3232              service :
33-                 name : shortcircuit-server 
33+                 name : shortcircuit-analysis- server 
3434                port :
3535                  number : 80 
0 commit comments