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