Instead of this, shouldn't this be: `$request->headers->has('referer')` ?