Skip to content

Sidecar: validate Host header outside Development - #4023

Merged
Tanuj Sood (soodt) merged 3 commits into
masterfrom
tanujsood/sidecar-connection-scoping
Sep 4, 2026
Merged

Tanuj Sood (soodt) merged 3 commits into
masterfrom
tanujsood/sidecar-connection-scoping

Conversation

@soodt

Copy link
Copy Markdown
Contributor

Sidecar: validate Host header outside Development

  • 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

Adds ASP.NET Core Host filtering for Microsoft.Identity.Web.Sidecar outside the
Development environment

What

  • Registers AddHostFiltering only when the environment is not Development.
  • Applies Host filtering in the request pipeline (scoped with UseWhen) rather than globally, so the /healthz endpoint stays exempt.
  • In Development, neither check is applied, so the inner-loop experience is unchanged.

@soodt
Tanuj Sood (soodt) requested a review from a team as a code owner September 2, 2026 15:09
@soodt
Tanuj Sood (soodt) force-pushed the tanujsood/sidecar-connection-scoping branch from 30bfc4c to 4c5722a Compare September 2, 2026 17:05
Comment thread src/Microsoft.Identity.Web.Sidecar/Program.cs Outdated
Comment thread src/Microsoft.Identity.Web.Sidecar/Program.cs Outdated
@soodt
Tanuj Sood (soodt) merged commit 1eecda2 into master Sep 4, 2026
9 checks passed
@soodt
Tanuj Sood (soodt) deleted the tanujsood/sidecar-connection-scoping branch September 4, 2026 15:51
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