Repository navigation
Conversation
leggetter
reviewed
Oct 29, 2026
| if err != nil { | ||
| return nil, err | ||
| } | ||
| httpClient.CheckRedirect = func(*http.Request, []*http.Request) error { |
Collaborator
There was a problem hiding this comment.
@alexluong I think not following redirects is the right default, and it matches the Standard Webhooks spec (a 3xx is a failure). It's effectively a breaking change though: anyone whose endpoint redirects today (http to https, a trailing slash) starts failing after the upgrade, and those failures count toward auto-disable. Can we flag it as breaking in the release notes and upgrade guide?
Product question too: are we OK shipping with no option to follow redirects? I don't think a product like Outpost should be following them, but it's your call.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Webhook deliveries no longer follow redirects. A 3xx response is a failed attempt with its status code, retried like any other failure.
Until now the webhook client used Go's default redirect policy and followed up to 10 hops. On a 307 or 308 it re-sent the event to the new URL. On a 301, 302 or 303 it switched to a GET without the body, so the new URL never received the event, yet its 2xx was recorded as a successful delivery. A 3xx the client doesn't follow (300, 304, or one without a
Locationheader) was also recorded as a success. The docs say an attempt fails on any non-2xx status; redirects now match that.Location.Other: the
redirect_errornetwork error code is removed; it can no longer occur.Behavior change (release notes): endpoints that answer with a redirect now fail. Common cases are an
http://URL redirected tohttps://and a missing or extra trailing slash. Update the destination URL to the final address. These attempts are retried and, when enabled, count toward auto-disable.🤖 Generated with Claude Code