This repository was archived by the owner on Mar 3, 2026. It is now read-only.
fix: respect useAuthWithCustomEndpoint flag for resumable uploads#2637
Merged
ddelgrosso1 merged 1 commit intogoogleapis:mainfrom Aug 27, 2025
Merged
Conversation
Fixes resumable uploads to respect the useAuthWithCustomEndpoint configuration flag when using custom API endpoints. Previously, resumable uploads would automatically bypass authentication for any non-googleapis.com domain, even when useAuthWithCustomEndpoint: true was explicitly set. This prevented using authenticated proxies or custom storage endpoints with resumable uploads. Changes: - Pass useAuthWithCustomEndpoint flag through to resumable upload configuration - Only bypass authentication if the flag is not explicitly set to true - Add useAuthWithCustomEndpoint property to Service class for proper access - Maintains backward compatibility with existing behavior Fixes #[issue-number]
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Contributor
|
Thank you for the PR @pm990320. Before we review, do you mind signing the CLA? |
Contributor
Author
Hey @ddelgrosso1 - I have now signed the CLA. |
ddelgrosso1
approved these changes
Aug 22, 2025
BenWhitehead
approved these changes
Aug 26, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes resumable uploads to respect the
useAuthWithCustomEndpointconfiguration flag when using custom API endpoints.Problem
Currently, resumable uploads automatically bypass authentication for any non-googleapis.com domain, even when
useAuthWithCustomEndpoint: trueis explicitly set. This prevents using authenticated proxies or custom storage endpoints with resumable uploads.Solution
useAuthWithCustomEndpointflag through to resumable upload configurationuseAuthWithCustomEndpointproperty to Service class for proper type-safe accessChanges Made
1.
src/nodejs-common/service.tsuseAuthWithCustomEndpoint?: booleantoServiceConfiginterfaceuseAuthWithCustomEndpoint?: booleanproperty toServiceclass2.
src/file.tsuseAuthWithCustomEndpointfrom Storage to resumable upload config3.
src/resumable-upload.tsuseAuthWithCustomEndpoint?: booleantoUploadConfiginterface4.
test/resumable-upload.tsTesting
Use Case
This fix is needed for:
Backward Compatibility
✅ Fully maintained - when
useAuthWithCustomEndpointis undefined, the behavior remains unchanged (bypasses auth for custom endpoints)