title: How can I create a "catch-all" firewall in Symfony?
body: <p>We have a Symfony firewall which is only valid for a certain host. When users make requests to pages guarded by this firewall, we are catching the request and doing the right approval/deny/ask for login step.</p>
  <p>It looks like this, roughly (some bits removed) and allows our-domain.com and direct subdomains to be used by this firewall.</p>
  <pre><code>        main:
              pattern:   ^/.*
              form_login: ...
              anonymous: true
              host: '^((([^.])+\.)?our-domain\.com)$'
              guard: ...
  </code></pre>
  <p>However, we are finding that a (cheeky) person is occasionally hitting one of these URLs but for a different host, e.g. an IP address or a different domain. As the firewall does not match this host, we are getting the following exception:</p>
  <blockquote>
  <p>The token storage contains no authentication token. One possible reason may be that there is no firewall configured for this URL.</p>
  </blockquote>
  <p>We are exploring different ways we could prevent requests on &quot;not allowed&quot; hosts, but we've as yet unable to find a suitable answer.</p>
  <p>One option that seems right is a &quot;deny all&quot; or a &quot;catch all else&quot; type firewall - something where we can say &quot;if you didn't match any of the other firewalls, then treat this as disallowed&quot;.</p>
  <p>Is there a way to do this in Symfony?</p>