From 8f6c965cd7794fcadc96c3b59efcb9569722a9a7 Mon Sep 17 00:00:00 2001 From: Luca Date: Fri, 10 May 2024 18:03:17 +0200 Subject: [PATCH] fix(inbound): exempt webhooks from CSRF protection --- shiftregister/messaging/views.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shiftregister/messaging/views.py b/shiftregister/messaging/views.py index ffe6de8..1bb09b2 100644 --- a/shiftregister/messaging/views.py +++ b/shiftregister/messaging/views.py @@ -10,11 +10,13 @@ from django.http import ( HttpResponseNotFound, HttpResponseServerError, ) +from django.views.decorators.csrf import csrf_exempt from .inbound import receiver from .signals import incoming_message +@csrf_exempt def handle_inbound(request): if receiver.handle is None: return HttpResponseNotFound()