mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-24 22:48:18 +00:00
Start throwing 404's
This commit is contained in:
@@ -29,6 +29,7 @@ use Illuminate\Contracts\Foundation\Application;
|
||||
use Illuminate\Contracts\View\Factory;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
/**
|
||||
* Class ShowController
|
||||
@@ -62,6 +63,9 @@ class ShowController extends Controller
|
||||
public function index(Webhook $webhook)
|
||||
{
|
||||
Log::channel('audit')->info(sprintf('User visits webhook #%d page.', $webhook->id));
|
||||
if(false === config('firefly.allow_webhooks')) {
|
||||
throw new NotFoundHttpException('Webhooks are not enabled.');
|
||||
}
|
||||
$subTitle = (string)trans('firefly.show_webhook', ['title' => $webhook->title]);
|
||||
|
||||
return view('webhooks.show', compact('webhook', 'subTitle'));
|
||||
|
Reference in New Issue
Block a user