I’m using the kong ingress in my kubernetes cluster. Here is a part of my yaml:
apiVersion: networking.k8s.io/v1beta1 kind: Ingress metadata: name: ingress annotations: kubernetes.io/ingress.class: "kong" konghq.com/strip-path: "true" spec: rules: - http: paths: - path: /api backend: serviceName: api servicePort: 8080 - path: / backend: serviceName: web servicePort: 80
My problem is when my front-end is uploading a file to my api.
It uses the endpoint
/api/uploadfile but kong is stripping the path to
/uploadfile. Then my api respond to the front-end with a Location header to tell the front-end where to send the file parts. This header is equal to
https://mydomaine.com/uploadfile, it is missing the
/api as the api app doesn’t know about this part of the url.
What I need is Kong to rewrite this header to add the
I made a little uml diagram to explain better what I need.
I looked at the response-transformer plugin but could not find a way to use it in my use case.
I also tried to use this annotation on my yaml:
But it did not change anything.
I’m a little bit lost here so if someone could help me it would be appreciated.
Version: kong:2.0 (Docker)