Skip to content

Suppress outbound HTTP redirects in the sidecar by default#3906

Merged
iNinja merged 3 commits into
AzureAD:masterfrom
soodt:tanujsood/sidecar-outbound-redirects
Jul 2, 2026
Merged

Suppress outbound HTTP redirects in the sidecar by default#3906
iNinja merged 3 commits into
AzureAD:masterfrom
soodt:tanujsood/sidecar-outbound-redirects

Conversation

@soodt

@soodt soodt commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

#Suppress outbound HTTP redirects in the sidecar by default

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Summary of the changes (Less than 80 chars)

Description

Suppress outbound HTTP redirects in the sidecar by default, with an opt-in  Sidecar:AllowOutboundRedirects  flag to restore following them.

Changes

  • Add Sidecar:AllowOutboundRedirects (bool, default false).
  • ConfigureHttpClientDefaults sets SocketsHttpHandler.AllowAutoRedirect from the option; scoped
    to the sidecar host — the shared Microsoft.Identity.Web.DownstreamApi library is unchanged.
  • Set AllowOutboundRedirects=true to restore following redirects.

Tests

  • Redirect not followed by default (302 returned to caller; redirect target not contacted).
  • Opt-in restores following.
  • Guard asserting the sidecar uses the default IHttpClientFactory path (bearer only).

Docs

  • README documents the new option.

{Detail}

Fixes #{bug number} (in this specific format)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@soodt soodt requested a review from a team as a code owner July 1, 2026 15:00
@iNinja iNinja merged commit e9a84c7 into AzureAD:master Jul 2, 2026
4 checks passed
This was referenced Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants