title: Symfony2 - how can I set custom CORS Headers?
body: <p>I want to set following Headers for TWIG Template from within my DefaultController:</p>
  
  <pre><code>header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
  header('Access-Control-Allow-Credentials: true');
  header('Access-Control-Allow-Origin: http://www.mywebsite.com');
  header('Access-Control-Allow-Headers: Content-Type, *');
  </code></pre>
  
  <p>Any suggestions how to do that?</p>