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

Add hook for redirect function in ServeHTTP #940

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Conversation

aharshit29
Copy link

@aharshit29 aharshit29 commented Oct 9, 2024

To migrate direct callers, a flipr controlled gate is needed. This PR adds a hook in Zanzibar Router's ServeHTTP function so that a redirect function can be plugged in, to redirect the requests (received for a particular endpoint) a different gateway.

This cannot be done at middleware level as ServeHTTP function also emits endpoint metrics which should not be emitted if the requests are being served by another gateway.

@aharshit29 aharshit29 merged commit ae69a0b into version-2 Oct 9, 2024
5 checks passed
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.

1 participant