mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
auth for webhook request with query-parameter "token"
This commit is contained in:
parent
94671fa67e
commit
ac69a4f717
@ -61,8 +61,12 @@ class BrevoController extends BaseController
|
||||
*/
|
||||
public function webhook(Request $request)
|
||||
{
|
||||
ProcessBrevoWebhook::dispatch($request->all())->delay(10);
|
||||
if ($request->has('token') && $request->get('token') == config('services.brevo.key')) {
|
||||
ProcessBrevoWebhook::dispatch($request->all())->delay(10);
|
||||
|
||||
return response()->json(['message' => 'Success'], 200);
|
||||
return response()->json(['message' => 'Success'], 200);
|
||||
}
|
||||
|
||||
return response()->json(['message' => 'Unauthorized'], 403);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user