mirror of
https://github.com/ansible/awx.git
synced 2026-02-23 22:16:00 -03:30
Disable the authentication classes for the webhook receivers
One of them was consuming the body of the posts. We do still need to have an extraneous `request.body` expression, though now in WebhookReceiverBase.post, since the `request.data` expression in the logging also consumes the request body.
This commit is contained in:
@@ -51,6 +51,7 @@ class WebhookReceiverBase(APIView):
|
||||
lookup_field = 'pk'
|
||||
|
||||
permission_classes = (AllowAny,)
|
||||
authentication_classes = ()
|
||||
|
||||
def get_queryset(self):
|
||||
qs_models = {
|
||||
@@ -95,6 +96,9 @@ class WebhookReceiverBase(APIView):
|
||||
|
||||
@csrf_exempt
|
||||
def post(self, request, *args, **kwargs):
|
||||
# Ensure that the full contents of the request are captured for multiple uses.
|
||||
request.body
|
||||
|
||||
logger.debug(
|
||||
"headers: {}\n"
|
||||
"data: {}\n".format(request.headers, request.data)
|
||||
|
||||
Reference in New Issue
Block a user