Skip to content

Conversation

@tjementum
Copy link
Member

Summary & Motivation

Fix the Sessions dialog showing the AppGateway's internal IP address (e.g., 10.0.0.54) instead of the user's real public IP address. This regression was introduced in commit c67bdac which added YARP's AddXForwarded transform.

  • Remove YARP's AddXForwarded() transform from AppGateway, which was replacing the original X-Forwarded-For header set by Azure Container Apps ingress
  • Update HttpExecutionContext.ClientIpAddress to read the X-Forwarded-For header directly and extract the first IP address (the original client), with a fallback to RemoteIpAddress for local development

The previous approach relied on UseForwardedHeaders middleware processing the header correctly across multiple proxy hops, but YARP's AddXForwarded transform was overwriting the header with the wrong IP before it reached the backend API.

Checklist

  • I have added tests, or done manual regression tests
  • I have updated the documentation, if necessary

@tjementum tjementum self-assigned this Jan 11, 2026
@tjementum tjementum added the Bug Something isn't working label Jan 11, 2026
@linear
Copy link

linear bot commented Jan 11, 2026

@tjementum tjementum moved this to 🏗 In Progress in Kanban board Jan 11, 2026
@tjementum tjementum added the Deploy to Staging Set this label on pull requests to deploy code or infrastructure to the Staging environment label Jan 11, 2026
@tjementum tjementum force-pushed the pp-757-ip-address-in-session-overview-shows-internal-ip branch from 939aa90 to 70e27ac Compare January 11, 2026 22:28
@sonarqubecloud
Copy link

@tjementum tjementum removed the Deploy to Staging Set this label on pull requests to deploy code or infrastructure to the Staging environment label Jan 11, 2026
@tjementum tjementum merged commit d9bcd6d into main Jan 11, 2026
27 checks passed
@tjementum tjementum deleted the pp-757-ip-address-in-session-overview-shows-internal-ip branch January 11, 2026 22:40
@github-project-automation github-project-automation bot moved this from 🏗 In Progress to ✅ Done in Kanban board Jan 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants