title: cookie not set in the axios request header
body: <ol>
  <li>I am having sprin boot application as my back end and vue js in the
  front end</li>
  <li>Both are running in my localhost but with different ports</li>
  <li>I am using axios to make api calls to my back end server</li>
  <li>My login api works perfetcly and resturns the response with set
  cookie header</li>
  </ol>
  
  <p>But cookie value  not being set in the request header and all other api fails with authentication problem because cookie value (session id) not present in the header<br>
  sample response header with set-cookie on authentication </p>
  
  <pre><code>HTTP/1.1 200 OK
  X-Powered-By: Express
  set-cookie: JSESSIONID=C6A3DE7E13C60F33D777875DB610EED2; Path=/a; HttpOnly
  x-content-type-options: nosniff
  x-xss-protection: 1; mode=block
  cache-control: no-cache, no-store, max-age=0, must-revalidate
  pragma: no-cache
  expires: 0
  x-frame-options: DENY
  content-type: application/json;charset=UTF-8
  transfer-encoding: chunked
  date: Tue, 12 May 2020 15:20:17 GMT
  connection: close
  </code></pre>
  
  <p>Below is my proxy configuration in vue.config.js</p>
  
  <pre><code> devServer: {
      proxy: {
        "/": {
          target: "http://localhost:8080/abc",
          secure: false,
          onProxyReq: function(request) {
            request.setHeader("origin", "http://localhost:8080/abc");
          }
        }
      },
      disableHostCheck: true
    }
  </code></pre>
  
  <p>This is my axios instance creation with "withCredentials:true"</p>
  
  <pre><code>  withCredentials: true,
    baseURL: "/",
    headers: { "Content-Type": "application/json" }
  });
  </code></pre>
  
  <p>Below is my web secuirty configuration in the server side </p>
  
  <pre><code>
          httpSecurity
                  .csrf().disable()
                  .httpBasic().disable()
                  .authorizeRequests()
                  .antMatchers("/auth/login").permitAll()
                  .antMatchers("/auth/reset-password").authenticated()
                  .anyRequest().authenticated();
      }
  </code></pre>
  
  <p><strong>Note</strong>:This works in the postman because post man automatically adds the cookie in the request header</p>