
Originally Posted by
sams_6
I had the very same issue - the load balancer was offloading SSL encryption/decryption and passing the request along on port 80. Spring's redirect notion ('redirect:') for relative URLs responds on the same protocol as the incoming request so all my redirects went out on port 80.
Fortunately our load balancer injects a header indicating that the request came in on SSL. I extended UrlBasedViewResolver to intercept relative 'redirect:' s (I left explicit fully-qualified redirects alone) and then extended RedirectView to check the request header for the load-balancer-injected flag and build an https: response if necessary.
Hope this helps. Drop me a line if you need more info.