Start throwing 404's

This commit is contained in:
James Cole
2023-12-29 08:35:54 +01:00
parent 7aa3aef508
commit 244ffb2450
5 changed files with 22 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ use FireflyIII\Http\Controllers\Controller;
use Illuminate\Contracts\View\Factory;
use Illuminate\Support\Facades\Log;
use Illuminate\View\View;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
/**
* Class CreateController
@@ -59,6 +60,9 @@ class CreateController extends Controller
public function index()
{
Log::channel('audit')->info('User visits webhook create page.');
if(false === config('firefly.allow_webhooks')) {
throw new NotFoundHttpException('Webhooks are not enabled.');
}
$previousUrl = $this->rememberPreviousUrl('webhooks.create.url');
return view('webhooks.create', compact('previousUrl'));