Node Fetch url, how to strip off hostname port
<p>I'm using node-fetch along with react.js. As mentioned in the document, I can cache an image buffer in this way.</p>

<pre><code>var fileType = require('file-type');
fetch('https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
.then(function(res) {
    return res.buffer();
}).then(function(buffer) {
    fileType(buffer);
});
</code></pre>

<p>But since my react.js running on localhost:3000, the fetch request will automatically append :3000 in the url. In this case, <a href="https://assets-cdn.github.com" rel="nofollow">https://assets-cdn.github.com</a><strong>:3000</strong>/images/modules/logos_page/Octocat.png.</p>

<p>But this URL is not valid, how can I remove the port?</p>