Fix async redirect handling regression from FOLLOW_REDIRECTS default#1316
Draft
cursor[bot] wants to merge 3 commits into
Draft
Fix async redirect handling regression from FOLLOW_REDIRECTS default#1316cursor[bot] wants to merge 3 commits into
cursor[bot] wants to merge 3 commits into
Conversation
* drop lookup buckets from CallerAccess policy * style fixes
Commit #1278 changed redirect following to default true unless FOLLOW_REDIRECTS is explicitly set. That broke async connectors (e.g. Slack Analytics) which rely on intercepting 3xx responses when FOLLOW_REDIRECTS is not configured. Restore the prior default: do not follow redirects in async processing unless FOLLOW_REDIRECTS is explicitly set. Add a unit test that locks in the behavior. Co-authored-by: Erik Schultink <eschultink@users.noreply.github.com>
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.
Bug and impact
PR #1278 introduced
FOLLOW_REDIRECTSbut changed the default from "disable redirect following in async mode" to alwaystruewhen unset. Async connectors such as Slack Analytics rely on the proxy intercepting 3xx responses and fetching theLocationURL manually (without forwarding sourceAuthorizationheaders to pre-signed download URLs). With auto-follow enabled, the HTTP client follows redirects transparently—often with auth headers attached—so the manual redirect block never runs and async imports fail or return unusable data.ChatGPT Enterprise is protected by an explicit
FOLLOW_REDIRECTS=FALSEin Terraform; Slack Analytics hasenvironment_variables: {}and was exposed.Root cause
Fix
Restore the prior default: when
FOLLOW_REDIRECTSis unset, follow redirects in sync mode and disable them in async mode. ExplicitFOLLOW_REDIRECTSstill overrides.Added
asyncModeDisablesRedirectFollowingByDefaultunit test to lock in the behavior.Validation
mvn test -pl core -Dtest=ApiDataRequestHandlerTest— 28 tests passFixes
Change implications
FOLLOW_REDIRECTS