<h1 dir="auto">Feature request</h1>
<p dir="auto">A related conversation to this feature happened here <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="528348833" data-permission-text="Title is private" data-url="https://github.com/vercel/next.js/issues/9524" data-hovercard-type="issue" data-hovercard-url="/vercel/next.js/issues/9524/hovercard?comment_id=574568879&amp;comment_type=issue_comment" href="https://github.com/vercel/next.js/issues/9524#issuecomment-574568879">#9524 (comment)</a></p>
<p dir="auto">if i use a headless CMS (even wordpress or graphcms or whatever), the asset url is used in the static html.</p>
<p dir="auto">There are two preferences here - that asset links be used as such.<br>
But more likely - download the asset, build the html (link to it locally) and then layer a CDN in front. This is the far more acceptable practice.</p>
<p dir="auto">This also ties in very well with using deployment systems like Netlify - which have a far, far more suitable globally available infrastructure than something like DatoCMS or Graphcms. So if im using Netlify as deployment, i would want everything to be served from Netlify domain and let it work its magic.</p>
<p dir="auto">We understand that this increases build times. This is ok for our usecase where we use a CMS just for the sake of usability, but deployment has to follow guidelines of compliance (geographic restriction of assets, etc) so we would like the entire build to be inside the export folder. This would mean that CMS that have CDN in front of it (e.g. datocms and <a href="http://www.datocms-assets.com" rel="nofollow">www.datocms-assets.com</a> which is Imgix) may not be ideal.</p>
<p dir="auto">There are tons of similar requests.</p>
<p dir="auto"><a href="https://spectrum.chat/next-js/general/how-would-you-handle-importing-remote-images-on-nextjs-static-export~30b2ba84-bc27-4da7-9ec8-21e4d5d287a3" rel="nofollow">https://spectrum.chat/next-js/general/how-would-you-handle-importing-remote-images-on-nextjs-static-export~30b2ba84-bc27-4da7-9ec8-21e4d5d287a3</a></p>
<p dir="auto">on gatsby side as well - <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="444846971" data-permission-text="Title is private" data-url="https://github.com/gatsbyjs/gatsby/issues/14076" data-hovercard-type="issue" data-hovercard-url="/gatsbyjs/gatsby/issues/14076/hovercard" href="https://github.com/gatsbyjs/gatsby/issues/14076">gatsbyjs/gatsby#14076</a></p>
<p dir="auto"><a href="https://spectrum.chat/gatsby-js/general/adding-remote-images-during-node-creation~e704e6fb-24b2-46c6-b1fc-93189d2e28a4" rel="nofollow">https://spectrum.chat/gatsby-js/general/adding-remote-images-during-node-creation~e704e6fb-24b2-46c6-b1fc-93189d2e28a4</a></p>
<p dir="auto"><a href="https://github.com/njosefbeck/gatsby-source-stripe/#downloading-files">https://github.com/njosefbeck/gatsby-source-stripe/#downloading-files</a></p>
<p dir="auto">I found this <a href="https://github.com/zeit/next.js/wiki/Redirecting-in-%60getInitialProps%60">wiki page</a> and have the following code to redirect in <code class="notranslate">getInitialProps</code>:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="  static async getInitialProps({res}) {
    res.writeHead(301, {
      Location: 'http://example.com'
    })
    res.end()
    res.finished = true
    return {}
}"><pre class="notranslate"><code class="notranslate">  static async getInitialProps({res}) {
    res.writeHead(301, {
      Location: 'http://example.com'
    })
    res.end()
    res.finished = true
    return {}
}
</code></pre></div>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the <a href="https://github.com/zeit/next.js/issues">issues</a> of this repository and believe that this is not a duplicate.</li>
</ul>
<h2 dir="auto">Expected Behavior</h2>
<p dir="auto">The page should redirect to <code class="notranslate">http://example.com</code> before rendering.</p>
<h2 dir="auto">Current Behavior</h2>
<p dir="auto">When I browse to the URL (the page is at <code class="notranslate">http://localhost:3000/dashboard</code>), the request just hangs. Here's what it looks like in the Chrome dev tools:<br>
<a href="https://www.dropbox.com/s/2v0c6x6ubi5v417/Screenshot%202017-08-19%2014.39.35.png?dl=0" rel="nofollow">screenshot</a>.</p>
<h2 dir="auto">Context</h2>
<p dir="auto">I swear this was working before and I have no clue what changed. I'm going to try playing with different versions of Express. Thanks for your help!</p>
<h2 dir="auto">Your Environment</h2>

<table role="table">
<thead>
<tr>
<th>Tech</th>
<th>Version</th>
</tr>
</thead>
<tbody>
<tr>
<td>next</td>
<td>3.0.6</td>
</tr>
<tr>
<td>node</td>
<td>8.1.1</td>
</tr>
<tr>
<td>OS</td>
<td>Mac Sierra (10.12.5)</td>
</tr>
<tr>
<td>browser</td>
<td>Chrome</td>
</tr>
<tr>
<td>express</td>
<td>4.15.3</td>
</tr>
</tbody>
</table>