mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fix header safeing
This commit is contained in:
parent
24a8c34699
commit
1b72dfeae6
@ -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,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user