spatie / laravel-referer

Remember a visitor's original referer

Home Page:https://freek.dev/686-a-package-to-remember-a-visitors-original-referer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spatie\Referer\Exceptions\InvalidConfiguration: `referer.session_key` can't be empty

jordanade opened this issue · comments

I'm getting these errors on a health-check route.

Spatie\Referer\Exceptions\InvalidConfiguration: `referer.session_key` can't be empty
  File "/public/index.php", line 55
    $request = Illuminate\Http\Request::capture()

My config file:

return [

    /*
     * The key that will be used to remember the referer in the session.
     */
    'session_key' => 'referer',

    /*
     * The sources used to determine the referer.
     */
    'sources' => [
        Spatie\Referer\Sources\UtmSource::class,
        Spatie\Referer\Sources\RequestHeader::class,
    ],
];

The controller invoked is quite simple:

class HealthCheckController extends Controller {

	public function application()
	{
		return response()->json(['status' => 'healthy'], 200);
	}

}

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.

This will do the trick:
php artisan cache:clear
php artisan config:clear
php artisan config:cache
php artisan view:clear