Describe the bug
After setting the env DESTINATIONS_WEBHOOK_MODE=standard i am observing that my webhook destination is receiving the following headers:
x-outpost-topic: order.completed
x-outpost-timestamp: 1769699475
x-outpost-signature: v1,dJtLfWX/Nx7JJ8MXtyucwceTrhzD+qRMHigT0xJ/xsE=
x-outpost-id: 4ba74706-4744-4054-8c6d-0d7fe604b356
Based on the v1 signature, it appears to be hashing according to the standards mode, but the header name prefix is supposed to be webhook- according to the documentation.
Note that I do not have DESTINATIONS_WEBHOOK_HEADER_PREFIX set, and I could probably fix it by setting it myself, but this seems like a bug.
To Reproduce
Steps to reproduce the behavior:
- Set webhook mode to standard
- Add a destination
- Publish an event
- Observe the header names received
Expected behavior
Received headers matches according too the documentation
Prefix for metadata headers added to webhook requests. Defaults to 'x-outpost-' in 'default' mode and 'webhook-' in 'standard' mode.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Tracing through the code a bit, I believe the problem comes from here https://github.com/hookdeck/outpost/blob/main/internal/destregistry/providers/default.go#L59 where the global default value, is overriding the standard default value from here https://github.com/hookdeck/outpost/blob/main/internal/destregistry/providers/destwebhookstandard/destwebhookstandard.go#L123 when the opts are applied
Describe the bug
After setting the env
DESTINATIONS_WEBHOOK_MODE=standardi am observing that my webhook destination is receiving the following headers:Based on the v1 signature, it appears to be hashing according to the standards mode, but the header name prefix is supposed to be
webhook-according to the documentation.Note that I do not have
DESTINATIONS_WEBHOOK_HEADER_PREFIXset, and I could probably fix it by setting it myself, but this seems like a bug.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Received headers matches according too the documentation
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Tracing through the code a bit, I believe the problem comes from here https://github.com/hookdeck/outpost/blob/main/internal/destregistry/providers/default.go#L59 where the global default value, is overriding the standard default value from here https://github.com/hookdeck/outpost/blob/main/internal/destregistry/providers/destwebhookstandard/destwebhookstandard.go#L123 when the opts are applied