Skip to content

app-root and redirect-to with wildcards #1479

Description

@Mickeyrourkeske

I got 2 ingresses with wildcard and app-root (redirect-to seems to have the same problem)

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: wildcard-ingress
  annotations:
    kubernetes.io/ingress.class: haproxy
    haproxy-ingress.github.io/app-root: /some-path/
spec:
  rules:
    - host: "*.foo.bar"
      http:
        paths:
          - path: /some-path/
            pathType: Prefix
            backend:
              service:
                name: some-service
                port:
                  number: 8080
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: www-ingress
  annotations:
    kubernetes.io/ingress.class: haproxy
spec:
  rules:
    - host: "www.foo.bar"
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: www-service
                port:
                  number: 8080

If I go to test.foo.bar I get redirected to test.foo.bar/some-path/

But if I go to www.foo.bar I also get redirected to www.foo.bar/some-path/

The redirect should not happen to an exact hostname.

Environment information

HAProxy Ingress version: v0.15.3

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions