This repository was archived by the owner on Feb 20, 2026. It is now read-only.
Repository navigation
fix: Allow user to set custom endpoints - #1101
Merged
Merged
Conversation
With the code in its present state, this test should fail. A fix for regional endpoints intends to clean this up.
Only set the credentials to insecure if the custom endpoint is localhost and credentials are not provided. This way the user can set custom endpoints with the client and the request will work.
There is a test that uses a mock which is preventing the base url from being set. The test should be more realistic and when it is, the test passes with the new change.
| const isUsingEmulator = | ||
| this.baseUrl_ && | ||
| (this.baseUrl_.includes('localhost') || | ||
| this.baseUrl_.includes('127.0.0.1')); |
Contributor
There was a problem hiding this comment.
Just in case, maybe add ::1 as an IPv6 version of localhost?
alexander-fenster
approved these changes
Apr 6, 2023
There is a third way the user can specify localhost. We should include this way as an option.
danieljbruce
marked this pull request as ready for review
April 11, 2023 14:45
|
hey all! This PR broke the docker setup for us. We're running the datastore emulator using a docker container so the datastore emulator host is something like How can we make changes to this code? If |
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.
This change allows the user to set a custom endpoint when creating the client and it will work with the backend the way it is supposed to. It also ensures that we can still work with the emulator using the client.