api: fix call of sentry proxy task
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
7c8bf42ef9
commit
abd9fab41a
|
@ -6,7 +6,7 @@ from authentik.root.celery import CELERY_APP
|
||||||
SENTRY_SESSION = get_http_session()
|
SENTRY_SESSION = get_http_session()
|
||||||
|
|
||||||
|
|
||||||
@CELERY_APP.task(bind=True)
|
@CELERY_APP.task()
|
||||||
def sentry_proxy(payload: str):
|
def sentry_proxy(payload: str):
|
||||||
"""Relay data to sentry"""
|
"""Relay data to sentry"""
|
||||||
SENTRY_SESSION.post(
|
SENTRY_SESSION.post(
|
||||||
|
|
|
@ -56,5 +56,5 @@ class SentryTunnelView(APIView):
|
||||||
dsn = header.get("dsn", "")
|
dsn = header.get("dsn", "")
|
||||||
if dsn != settings.SENTRY_DSN:
|
if dsn != settings.SENTRY_DSN:
|
||||||
return HttpResponse(status=400)
|
return HttpResponse(status=400)
|
||||||
sentry_proxy.delay(full_body)
|
sentry_proxy.delay(full_body.decode())
|
||||||
return HttpResponse(status=204)
|
return HttpResponse(status=204)
|
||||||
|
|
Reference in New Issue