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 proxy support for global fetch #696

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

Kruspe
Copy link
Contributor

@Kruspe Kruspe commented Nov 17, 2024

Issue #650:

Description of changes:
Support setting the dispatcher for the global fetch implementation.
Instead of ignoring the created request, we now use it and pass the dispatcher option if it is available.

Added an integration test with a reverse proxy to check that the trace header is there.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@Kruspe Kruspe requested a review from a team as a code owner November 17, 2024 16:56
@@ -127,7 +128,7 @@ function enableCapture(baseFetchFunction, requestClass, downstreamXRayEnabled, s
const requestClone = request.clone();
let response;
try {
response = await baseFetchFunction(requestClone);
response = await baseFetchFunction(requestClone, fetchOptions);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

My first idea was to pass down the entire args again but this would overwrite the changes we do to the request like adding the trace header as the headers from the options take priority over the headers that are already set for a request.

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