I am trying to write a regex to route certain routes, including a default /
, but can’t seem to figure this out .
Trying in playground here , this should work /\W.*|(/mainApp/latest).*|(/js/).*
(NOTE: I have a double slash in front of W
when in yaml fail) , but when defined in yaml and applied , the default path /
isn’t getting identified
I would like to route the following requests
https://my.host.name/mainApp/latest
https://my.host.name
https://my.host.name/
https://my.host.name/mainApp/latest/css/test.css
https://my.host.name/js/main.5160ddad.js
but want to EXCLUDE a https://my.host.name/my-api-service
from this regex (there is another Ingress defined for that)
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
....
spec:
rules:
- host: my.host.name
http:
paths:
- path: /\\W.*|(/mainApp/latest).*|(/js/).*
pathType: ImplementationSpecific
...
---