-
Notifications
You must be signed in to change notification settings - Fork 430
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
feat(core): allow domain sharding #7061
Draft
rexxars
wants to merge
3
commits into
next
Choose a base branch
from
feat/domain-sharding
base: next
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+263
−102
Conversation
This file contains 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
No changes to documentation |
Component Testing Report Updated Jul 2, 2024 10:58 PM (UTC)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
This is the studio integration side of sanity-io/client#860 - see that PR for rationale.
I'll rebase/change this PR to use a regular release of the client once the above is merged and released.
The implementation works like this:
/ping
route.Timing-Allow-Origin
header), which allows us to get the HTTP protocol used to access it.This is only enabled for customers with
allowDomainSharding
set totrue
, as well as theauth.loginMethod
set totoken
. This is unfortunate, but we cannot get the auth cookie set on the regular project hostname propagated, so we have to use tokens. This does introduce overhead, since all requests will have preflight requests.Note that this is a temporary workaround, while we work on a more permanent solution.
What to review
Either disable HTTP2/3 support (through browser flag or similar), or set
FORCE_DOMAIN_SHARDING
totrue
increateAuthStore
and observe domain sharding behavior in staging. Setting theFORCE_DOMAIN_SHARDING
flag back tofalse
(or re-enabling HTTP2/3) and observe that it does not use domain sharding.Testing
I realize this is missing tests. Since this is a temporary workaround, I find this acceptable for now. But if you feel strongly, shout out.
Notes for release
None. This is a silent release - we only want select customers to use this as a workaround, not a permanent solution.