Skip to content
GitHub

Configuration

Config section: webhook (config_key in WebhookBundleProvider and WebhookCoreProvider).

Environment variable prefix: LEX_WEBHOOK__ (e.g. LEX_WEBHOOK__RETRY_MAX_ATTEMPTS=10).

WebhookConfig in lexigram.webhook.config.

KeyTypeDefaultEnv varDescription
store_backendstr"memory"LEX_WEBHOOK__STORE_BACKENDPersistence backend. "sql" requires [sql] extra
retry_max_attemptsint5LEX_WEBHOOK__RETRY_MAX_ATTEMPTSMax delivery attempts before dead-letter
retry_base_delayfloat1.0LEX_WEBHOOK__RETRY_BASE_DELAYInitial retry delay in seconds
retry_max_delayfloat60.0LEX_WEBHOOK__RETRY_MAX_DELAYMax retry delay ceiling in seconds
retry_backoff_factorfloat2.0LEX_WEBHOOK__RETRY_BACKOFF_FACTORExponential backoff multiplier
secret_lengthint32LEX_WEBHOOK__SECRET_LENGTHSecret in bytes (hex output is 2×)
secret_rotation_grace_hoursint24LEX_WEBHOOK__SECRET_ROTATION_GRACE_HOURSHours both old and new secrets are accepted
delivery_timeout_secondsfloat30.0LEX_WEBHOOK__DELIVERY_TIMEOUT_SECONDSHTTP request timeout per attempt
disable_after_consecutive_failuresint50LEX_WEBHOOK__DISABLE_AFTER_CONSECUTIVE_FAILURESAuto-disable threshold
failure_window_hoursint24LEX_WEBHOOK__FAILURE_WINDOW_HOURSWindow for counting consecutive failures
signature_algorithmstr"sha256"LEX_WEBHOOK__SIGNATURE_ALGORITHMHMAC algorithm ("sha256", "sha512")
enable_adminboolTrueLEX_WEBHOOK__ENABLE_ADMINRegister admin contributor
delivery_log_retention_daysint30LEX_WEBHOOK__DELIVERY_LOG_RETENTION_DAYSDays to retain delivery log (0 = indefinite)
signature_headerstr"X-Webhook-Signature"LEX_WEBHOOK__SIGNATURE_HEADERHTTP header for HMAC signature
event_type_headerstr"X-Webhook-Event-Type"LEX_WEBHOOK__EVENT_TYPE_HEADERHTTP header for event type
event_id_headerstr"X-Webhook-Event-ID"LEX_WEBHOOK__EVENT_ID_HEADERHTTP header for event ID
timestamp_headerstr"X-Webhook-Timestamp"LEX_WEBHOOK__TIMESTAMP_HEADERHTTP header for delivery timestamp
webhook:
store_backend: sql
retry_max_attempts: 10
retry_base_delay: 2.0
retry_max_delay: 120.0
retry_backoff_factor: 2.0
secret_length: 64
signature_algorithm: sha512
signature_header: X-Custom-Webhook-Signature
disable_after_consecutive_failures: 100
delivery_log_retention_days: 90
enable_admin: true
Terminal window
export LEX_WEBHOOK__STORE_BACKEND=sql
export LEX_WEBHOOK__RETRY_MAX_ATTEMPTS=10
export LEX_WEBHOOK__RETRY_BASE_DELAY=2.0
export LEX_WEBHOOK__SIGNATURE_ALGORITHM=sha512

The webhook module resolves config via LexigramConfig.get_section("webhook", WebhookConfig).