How should HttpHeaders be configured for requests to localhost if origin is https? How should HttpHeaders be configured for requests to localhost if origin is https? kubernetes kubernetes

How should HttpHeaders be configured for requests to localhost if origin is https?


So I guess the frontend works fine. You are having issues with the backend routing.

I suggest that create another deployment for the backend application. Create a Kube service type of "ClusterIP" , keep port and targetPort of service to "8081"

And then use path-based routing through another ingress config to forward backend service to frontend URL.

Ex. frontend app is on https://my.domain.com/and backend will be accessible on https://my.domain.com/api/

apiVersion: extensions/v1beta1kind: Ingressmetadata:  name: backend-config  annotations:    kubernetes.io/ingress.class: nginx    nginx.ingress.kubernetes.io/ssl-redirect: "true"    nginx.ingress.kubernetes.io/rewrite-target: /$2spec:  tls:  - hosts:    - hello.mydomain.com    secretName: hello-tls  rules:  - host: hello.mydomain.com    http:      paths:      - backend:          serviceName: backend-service          servicePort: 8081        path: /api/(/|$)(.*)