Skip to content

Commit

Permalink
Make structure-webhooks use POST method instead of GET and ignore CSRF
Browse files Browse the repository at this point in the history
  • Loading branch information
tommysolsen committed Dec 8, 2023
1 parent eeb0fbe commit 7b77c45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Providers/ToolboxProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Netflex\Toolbox\Providers;

use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Validator;
Expand All @@ -23,7 +24,8 @@ public function register()

public function boot()
{
Route::get('/.well-known/netflex/structure-webhooks', [StructureWebhookController::class, 'process']);
Route::post('/.well-known/netflex/structure-webhooks', [StructureWebhookController::class, 'process'])
->withoutMiddleware(VerifyCsrfToken::class);
$this->bootRecaptcha();
$this->bootOrderCommandConfigs();
}
Expand Down

0 comments on commit 7b77c45

Please sign in to comment.