Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Remove callback URL path check from webhook processing #629

Merged
merged 2 commits into from
Dec 8, 2022

Conversation

paulomarg
Copy link
Contributor

@paulomarg paulomarg commented Dec 8, 2022

WHY are these changes introduced?

Closes #625
Closes https://github.com/Shopify/first-party-library-planning/issues/514

We're currently checking whether the received URL matches the configured path when processing webhooks, but that check fails when the webhook request is proxied.

This check was added to allow for multiple handlers for the same topic to be in the same URL, but that scenario is much less realistic than a proxied webhook call, so we should allow it.

WHAT is this pull request doing?

Removing the callback URL check when processing webhooks and the unrealistic test case.

Type of change

  • Patch: Bug (non-breaking change which fixes an issue)

Checklist

  • I have added a changelog entry, prefixed by the type of change noted above
  • I have added/updated tests for this change
  • I have documented new APIs/updated the documentation for modified APIs (for public APIs)

@paulomarg paulomarg requested a review from a team as a code owner December 8, 2022 15:44
@paulomarg paulomarg force-pushed the remove_callback_url_check_from_webhooks branch from a100348 to 7ee82c0 Compare December 8, 2022 15:47
@paulomarg paulomarg force-pushed the remove_callback_url_check_from_webhooks branch from 7ee82c0 to bcc91f8 Compare December 8, 2022 15:48
Copy link
Contributor

@cquemin cquemin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice and clean.

@paulomarg paulomarg merged commit 4470427 into main Dec 8, 2022
@paulomarg paulomarg deleted the remove_callback_url_check_from_webhooks branch December 8, 2022 17:00
@shopify-shipit shopify-shipit bot temporarily deployed to production December 8, 2022 20:09 Inactive
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v6: InvalidWebhookError: No HTTP webhooks registered for topic products/update
2 participants