title: Add CSRF to assets for Angular
body: <p>I created an assetHandler to server static angular files but when I first request the handler it does not include any CSRF token as a cookie thus if I submit a form it does not include the CSRF token and I get the Unauthenticated User error.</p>
  
  <p>Is it possible to explicitly set the CSRF token?</p>
  
  <p>Here is the handler I created.</p>
  
  <pre><code>def assetHandler(file: String): Action[AnyContent] = {
      var name = file
  
      if (!file.contains(".")) {
        name = Seq("index.html").mkString
      }
  
      controllers.Assets.at("/public/lib/platform", name)
  }
  </code></pre>
  
  <p>PS. If I first request another regular controller (e.g. /api/ping) Play sends the CSRF for that request and thus angular is able to use it in every request. Is it a good practise to call an extra controller?</p>