mirror of
https://github.com/simple-login/app.git
synced 2024-09-28 20:51:29 +02:00
feat: allow to disable event-webhook (#2118)
This commit is contained in:
parent
aad6f59e96
commit
450322fff1
@ -586,3 +586,4 @@ EVENT_WEBHOOK = os.environ.get("EVENT_WEBHOOK", None)
|
||||
|
||||
# We want it disabled by default, so only skip if defined
|
||||
EVENT_WEBHOOK_SKIP_VERIFY_SSL = "EVENT_WEBHOOK_SKIP_VERIFY_SSL" in os.environ
|
||||
EVENT_WEBHOOK_DISABLE = "EVENT_WEBHOOK_DISABLE" in os.environ
|
||||
|
@ -34,6 +34,9 @@ class EventDispatcher:
|
||||
dispatcher: Dispatcher = PostgresDispatcher.get(),
|
||||
skip_if_webhook_missing: bool = True,
|
||||
):
|
||||
if config.EVENT_WEBHOOK_DISABLE:
|
||||
return
|
||||
|
||||
if not config.EVENT_WEBHOOK and skip_if_webhook_missing:
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user