title: HTTP headers react-router
body: <p>I haven't found an answer to my question so far, so I hope you guys know the answer. I'm looking for an easy way to set http headers within react. To my opinion it would be a nice solution to set them directly inside the router:</p>
  
  <pre><code>render((
    &lt;Router history={browserHistory}&gt;
      &lt;Route path="/" component={App}&gt;
        &lt;Route path="about" component={About}/&gt;
        &lt;Route path="users" component={Users}&gt;
          &lt;Route path="/user/:userId" component={User}/&gt;
        &lt;/Route&gt;
        &lt;Route path="*" component={NoMatch}/&gt;
      &lt;/Route&gt;
    &lt;/Router&gt;
  ), document.getElementById('root'))
  </code></pre>
  
  <p>maybe as an attribute or just as an extra tag <code>&lt;Header&gt;</code>, so you can easily specify per route which headers you would like to set. For example, for all routes (<code>path="*"</code>):</p>
  
  <blockquote>
    <p>Content-Security-Policy: script-src 'self' <a href="https://apis.google.com" rel="noreferrer">https://apis.google.com</a></p>
  </blockquote>
  
  <p>Just an idea. Is there any module which supports this kind of functionality? Or if that's not the case, is there any reason why not?</p>