reverse-proxy icon indicating copy to clipboard operation
reverse-proxy copied to clipboard

Add support for custom affinity failure policies

Open hughesjon opened this issue 6 years ago • 1 comments

What should we add or change to make your life better?

Change IAffinityFailurePolicy from internal to public.

Why is this important to you?

The documentation seems to imply that custom failure policies should be possible, however because the interface is internal it's not possible to actually implement any additional policies.

In our app we need to execute a 302 redirect to recover from an affinity failure. A custom failure policy seems like a good fit for this. I tried it and it seems to work fine.

I would be very happy to submit a PR containing this very small change, but I understand that you may also want to review the API before committing to it...

hughesjon avatar Dec 03 '20 23:12 hughesjon

I think it was meant to be public. Yes we should fix this. Feel free to send a PR. https://github.com/microsoft/reverse-proxy/blob/150e34c37b24d280e6c52c57a392b39ded4dcc1c/src/ReverseProxy/Service/SessionAffinity/IAffinityFailurePolicy.cs#L13

Tratcher avatar Dec 03 '20 23:12 Tratcher