Skip to content

Commit

Permalink
Merge pull request #20 from GC-Mark/patch-1
Browse files Browse the repository at this point in the history
Pass the server variables from the Laravel request
  • Loading branch information
JayBizzle committed Jul 6, 2022
2 parents 11fd996 + 51236c7 commit a033957
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/LaravelCrawlerDetectServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public function boot()
*/
public function register()
{
$this->app->singleton('LaravelCrawlerDetect', function ($app) {
return new \Jaybizzle\CrawlerDetect\CrawlerDetect();
$this->app->singleton('LaravelCrawlerDetect', function () {
return new \Jaybizzle\CrawlerDetect\CrawlerDetect(request()->server());
});
}

Expand Down

0 comments on commit a033957

Please sign in to comment.