fix header safeing

This commit is contained in:
Matthias 2021-10-20 22:04:36 +02:00
parent 24a8c34699
commit 1b72dfeae6
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -11,6 +11,7 @@ import decimal
import math import math
import uuid import uuid
import hmac import hmac
import json
import hashlib import hashlib
import base64 import base64
from secrets import compare_digest from secrets import compare_digest
@ -1362,9 +1363,8 @@ class WebhookEndpoint(models.Model):
def save_data(self, payload, headers=None, request=None): def save_data(self, payload, headers=None, request=None):
return WebhookMessage.objects.create( return WebhookMessage.objects.create(
# host=request.host, host=request.get_host(),
# TODO fix header=json.dumps({key: val for key, val in headers.items()}),
header=headers,
body=payload, body=payload,
endpoint=self, endpoint=self,
) )