Skip to content

Webhook mode standard delivers wrong header names #664

Description

@Fraaankes

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:

  1. Set webhook mode to standard
  2. Add a destination
  3. Publish an event
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions