title: Angular4 proxy config bad request
body: <p>I'm trying to reach github api from my angular application.</p>
  
  <p>Here's my proxy config:</p>
  
  <pre><code>{
    "/api/github/*": {
      "target": "https://api.github.com",
      "secure": false,
      "logLevel": "debug",
      "pathRewrite": {
        "^/api/github": ""
      }
    }
  }
  </code></pre>
  
  <p>So when I ping something like <code>http://localhost:4200/api/github/users/linus</code> from my angular service I'm supposed to be pointed <code>https://api.github.com/users/linus</code>. But each time this request is sent I get <code>400 BAD REQUEST</code>, which should't be the case as the api link is working fine.</p>
  
  <p>Here's log from my app runtime that shows this proxy activity:</p>
  
  <pre><code>webpack: Compiled successfully.
  [HPM] Rewriting path from "/api/github/users/linus" to "/users/linus"
  [HPM] GET /api/github/users/linus ~&gt; https://api.github.com
  </code></pre>