Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider deprecating HotPotatoMiddleware in favor of a default HTTP handler #5

Open
lambchop4prez opened this issue Apr 26, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@lambchop4prez
Copy link
Collaborator

I wanted to open this up to start the discussion. I may mock up a quick POC to show what I mean.

Basically, I think we aren't quite using the ASPNET Core middleware in the way that it was originally intended. From my understanding the middleware is meant to inspect and act on requests before they make it to their handler. With the HotPotatoMiddleware, the request is basically hijacked and doesn't make it to the handler. I don't think this is necessarily a problem, especially since it works.

The way I'm thinking of it, we can create a base HotPotatoController to act as a default handler (i.e. it will capture all requests that aren't for /cookies or /results). This controller would have the IProxy injected and will basically have all of the same functionality as HotPotatoMiddleware.

This may also help with using this with TestServer, no matter what design we go with I want to make sure we have better support for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant