title: Redirect from Spring boot REST API to separated react frontend
body: <p>I have two applications: Backend - Spring Boot 2 REST API and Frontend - React</p>
  <p>In the backend application, one of my controllers receive a <code>POST</code> request from another application that I have no control over. From this controller I want to redirect the client to my react frontend application. Is it possible?</p>
  <p>My controller has this method that will handle the redirect</p>
  <pre><code>@Controller
  @RequestMapping(value=&quot;/api&quot;)
  public class JumpController {
  
      @PostMapping(value = &quot;/{redirect}&quot;)
      public String jump(@PathVariable(&quot;redirect&quot;) final String redirect) {
          return &quot;redirect:http://localhost:8443/category/&quot; + redirect;
      }
  }
  </code></pre>
  <p>When I test the applications in debug mode in chrome the client is doing a GET request to <code>http://localhost:8443/category/gallery</code>. And I'm getting a <code>404 (Not Found)</code> because of the <code>GET</code> request method.</p>
  <p>How can I tell the client to visit the actual page at <code>http://localhost:8443/category/gallery</code> without doing a <code>GET</code> operation?</p>
  <p>Unfortunately I cannot change behaviour of the other application. I must handle the <code>POST</code> request to my application.</p>