1

So I have a Spring website which is https://. At one point I need to redirect a user from a link clicked on my site to an http:// site. I'm doing this with a click on https://mywebsite.com/redirect/some-key.

In my Java backend, I'm taking the some-key and redirecting the browser to an http:// link with return new ModelAndView(new RedirectView("http://somewhere.com", false, true)); (false referring to relative context, true referring to http10Compatible).

Instead of redirecting to the http://somewhere.com site, it redirects to https://somewhere.com.

I know there should be a straightforward way to do this, just feel lost currently.

JR3652
  • 435
  • 1
  • 4
  • 13
  • 1
    Possible duplicate of [Spring Boot redirect HTTP to HTTPS](https://stackoverflow.com/questions/26655875/spring-boot-redirect-http-to-https) – Jonathan Gagne Oct 31 '18 at 00:10

0 Answers0