title: webpack dev server + spring boot + oauth2
body: <p>When app is running, we have following flow:</p>
  
  <ol>
  <li>User enters url 'host:8080/book/123'</li>
  <li>Backend reveals that user is not authenticated and redirects to keycloak.</li>
  <li>User enters password+name and logins.</li>
  <li>User is redirected back to 'host:8080/book/123'</li>
  </ol>
  
  <p>This works fine, however I do not understand how in this case I can use webpack-dev-server. The problem is (i.e. webpack dev server is on port 8090):</p>
  
  <ol>
  <li>"First" request to host:8090/book/123 should be redirected to backend for login</li>
  <li>"Second" request should be not redirect, index.html should be returned.</li>
  </ol>
  
  <p>Can I make this setup without modifying code?</p>
  
  <p>UPDATE.
  As a workaround: 
  defined variable using DefinePlugin, in js this variable is used to use different login processes.</p>