Skip to content

Commit

Permalink
Fix usage of the enabled config flag
Browse files Browse the repository at this point in the history
  • Loading branch information
LKaemmerling committed Mar 12, 2021
1 parent 5d985dc commit 29d526e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/HorizonPrometheusExporterServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ protected function routes()
return;
}

Route::middleware(config('horizon-exporter.middleware'))->group(
__DIR__ . '/../routes/api.php'
);
if (config('horizon-exporter.enabled')) {
Route::middleware(config('horizon-exporter.middleware'))->group(
__DIR__ . '/../routes/api.php'
);
}
}
}

0 comments on commit 29d526e

Please sign in to comment.