Skip to content
This repository was archived by the owner on Jul 3, 2021. It is now read-only.

Added ProxyKitClient as optional argument#125

Merged
damianh merged 2 commits intoProxyKit:masterfrom
abergs:master
Jun 30, 2019
Merged

Added ProxyKitClient as optional argument#125
damianh merged 2 commits intoProxyKit:masterfrom
abergs:master

Conversation

@abergs
Copy link
Copy Markdown

@abergs abergs commented Jun 24, 2019

Code discussed in #124

I moved the creation of ProxyKitClient outside of the forwarding hotpath since it uses reflection to generate httpClients

@damianh
Copy link
Copy Markdown
Collaborator

damianh commented Jun 25, 2019

Thanks for PR! Will take a look shortly.

@damianh damianh self-requested a review June 30, 2019 18:28
@damianh damianh self-assigned this Jun 30, 2019
@damianh damianh added the enhancement New feature or request label Jun 30, 2019
@damianh damianh merged commit 4f47bcb into ProxyKit:master Jun 30, 2019
damianh added a commit that referenced this pull request Jun 30, 2019
…instead inject ProxyKitClient into the middleware so it is activated just once.

- Pass it through to ForwardContext via HttpContext.Items removing the need of the optional paramater on ForwardTo

Fixes #124 and improves on #125
@damianh
Copy link
Copy Markdown
Collaborator

damianh commented Jun 30, 2019

I improved on the PR in a7623d9 . Instead, ProxyKitClient is injected into ProxyMiddleware and passed to the ForwardToContext via HttpContext.Items. This removes the need for the optional parameter and potentially confused users ("when do I use that?")

@damianh damianh added this to the v2.1.1 milestone Jun 30, 2019
@abergs
Copy link
Copy Markdown
Author

abergs commented Jun 30, 2019 via email

damianh added a commit that referenced this pull request Jul 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants