I am creating an application based on java 8 and Springboot using docker and kubernetes on Google Cloud Platform. The application is a RESTFull api which has a Http Header named as SIGNATURE. My point is that thru ingress controller the SIGNATURE header isn't being passed.
Scenario
Problem
Throw "Missing request header SIGNATURE" exception while executing the api.
Question
How can I passing custom headers from client to the backend using NGINX Ingress Controller?
Artifacts
public ResponseEntity<TransactionDTO> get( @RequestHeader("SIGNATURE") String apiSignature,
@RequestHeader("application/json") String contentType,
@PathVariable Long id)
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: api-ingress
annotations:
kubernetes.io/ingress.class: nginx
ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: "false"
spec:
rules:
- host: api.domain.com.br
http:
paths:
- path: /manager
backend:
serviceName: api-svc
servicePort: 8086
Thanks in advance...