Skip to content

Conversation

@yousif-bugsnag
Copy link
Contributor

Goal

Configuring a proxy requires creating a new HttpClient because the HttpClientHandler (which handles the proxy settings) cannot be modified once the HttpClient is created.

This PR improves the handling of the delivery configuration for request scoped clients to ensure that HttpClient instances are not unnecessarily disposed and recreated for each request when a proxy is specified.

Design

Added a new client constructor overload to support creating clients with a preconfigured delivery instance, and updated the logic in Bugsnag.AspNet and Bugsnag.AspNet.Core to use this and configure delivery once on startup

Testing

Tested manually

@yousif-bugsnag yousif-bugsnag requested a review from lemnik March 26, 2025 15:51
Copy link
Contributor

@lemnik lemnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@yousif-bugsnag yousif-bugsnag merged commit a8f69d3 into next Mar 26, 2025
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