I have deployed my application in aks environment and I'm using ingress-nginx
- when I access my URL like this https://allure-report.com/200/ than I can access my application but
- when I access my URL like this https://allure-report.com/200 ( without / at end ) there is a white Blank page coming
my ingress rule file
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: allure-ingress
namespace: allure-report
annotations:
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: basic-auth
cert-manager.io/cluster-issuer: letsencrypt-issuer
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/use-regex: "true"
spec:
ingressClassName: nginx
rules:
- host: allure-report.com
http:
paths:
- backend:
service:
name: allure-service
port:
number: 80
path: /200/?(.*)
pathType: Prefix
tls:
- hosts:
- allure-report.com
secretName: allure-ingress-secret
Thank you in advance
tried :
- /200(/|$)(.*)
- /200(/|/?.*)
above both are not even working for /200/ path
You use
pathType: Prefixin your ingress.While Ingress API allows users to specify different pathType on Ingress object.
pathType
ExactandPrefixshould allow only a small set of characters, pathTypeImplementationSpecificallows any characters, as it may contain regexes, variables and other features that may be specific of the Ingress Controller being used.You may use pathType
ImplementationSpecificand try also/200(/|$)(.*)