title: Symfony2 - how to check if referer is external referer?
body: <p>I created a custom success_handler for my login, and here I want to check if the referer was external or not. How do I best do this? </p>
  
  <pre><code>$ref = $request-&gt;headers-&gt;get('Referer'); 
  </code></pre>
  
  <p>What is the best way to check if the referer is a local url (meaning: from within the symfony project) or external ? </p>
  
  <p>Thanks in advance. </p>