ResponseEntity in Spring MVC for https

2/18/2020

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); 
-- Mohammed Niaz
https
kubernetes
spring-boot
spring-mvc

0 Answers