title: Django documentation in Kubernetes using Ingress
body: <p>We have a platform built using microservices architecture, which is deployed using Kubernetes and Ingress. One of the platform's components is a Django Rest API. 
  The yaml for the Ingress is the below (I have changed only the service names &amp; endpoints):</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: dare-ingress
    annotations:
      kubernetes.io/ingress.provider: nginx
      nginx.ingress.kubernetes.io/ssl-redirect: "false"
      nginx.ingress.kubernetes.io/rewrite-target: /$1
      certmanager.k8s.io/issuers: "letsencrypt-prod"
      certmanager.k8s.io/acme-challenge-type: http01
  spec:
    tls:
    - hosts:
      - demo-test.com
      secretName: dare-ingress-tls
    rules:
    - host: demo-test.com
      http:
        paths:
        - path: /prov/?(.*)
          backend:
            serviceName: prov
            servicePort: 8082
        - path: /(prov-ui/?(.*))
          backend:
            serviceName: prov-ui
            servicePort: 8080
        - path: /flask-api/?(.*)
          backend:
            serviceName: flask-api
            servicePort: 80
        - path: /django-rest/?(.*)
          backend:
            serviceName: django-rest
            servicePort: 8000
  </code></pre>
  
  <p>The django component is the last one. I have a problem with the swagger documentation. While all the Rest calls work fine, when I want to view the documentation the page is not load. This is because it requires login and the redirection to the documentation does not work. </p>
  
  <p>I mean that, without Ingress the documentation url is for example: <a href="https://demo-test.com/docs" rel="nofollow noreferrer">https://demo-test.com/docs</a> but using Ingress, the url should be <a href="https://demo-test.com/django-rest/login" rel="nofollow noreferrer">https://demo-test.com/django-rest/login</a> and then <a href="https://demo-test.com/django-rest/docs" rel="nofollow noreferrer">https://demo-test.com/django-rest/docs</a> but the redirection does not work, I get a 404 error.
  Does anyone have any idea how to fix this in Ingress?</p>