title: How can I handle redirects in vue cli development server with a proxy?
body: <p>my project setup consists of a vue application with several pages on the frontend and a flask backend. </p>
  
  <p>For my development setup I am using the <code>devServer.proxy</code> setting in <code>vue.config.js</code>:</p>
  
  <pre class="lang-js prettyprint-override"><code>module.exports = {
    devServer: {
      proxy: "http://localhost:5000"
    }
  }
  </code></pre>
  
  <p>This is working fine for almost all requests. The problem arises when the backend server issues a redirect request, which is obviously pointing to a URL on the backend. However in the development setup this page does not exist yet, as it is served by the webpack development server. (I am testing a login page which redirects to the actual content after successful authentication)</p>
  
  <p>Ultimately I would like to rewrite the redirect to point to the according URL on the webpack server. (Well, any other working solution is welcome, too)</p>
  
  <p>Does somebody know how to accomplish that?</p>