move csrf_exempt decorator to dispatch()

This commit is contained in:
Thomas Steen Rasmussen 2016-05-29 19:21:44 +02:00
parent cf46544294
commit 3c8a1427da

View file

@ -382,6 +382,9 @@ class CoinifyRedirectView(LoginRequiredMixin, EnsureUserOwnsOrderMixin, EnsureUn
class CoinifyCallbackView(SingleObjectMixin, View):
@method_decorator(csrf_exempt)
def dispatch(self, *args, **kwargs):
return super(CoinifyCallbackView, self).dispatch(*args, **kwargs)
def post(self, request, *args, **kwargs):
# Get the signature from the HTTP headers
signature = request.META['HTTP_X_COINIFY_CALLBACK_SIGNATURE']