In Spring boot MVC application, in Controller class the ResponseEntity which returns file attachment and working fine. When I deploy this application in kubernetes with Ingress service enabled, the ResponseEntity returns Page Cannot be displayed message. Because the supported protocol is https whereas ResponseEntity supports http.
How to get the same behavior in kubernetes as well?
Code:
return ResponseEntity.ok().header(HttpHeaders.CONTENT_DISPOSITION,
"attachment; filename=\"" + file.getFilename() + \"").body(file);