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.
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: Iterate on toolbar iframe message passing and api endpoint domain #81942
feat: Iterate on toolbar iframe message passing and api endpoint domain #81942
Changes from 1 commit
1a5468d
63e0c12
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why save cookies to both of these domains?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
window.location.hostname
is going to be used when we reload the iframe, it's likedemo.sentry.io
and
regionUrl
is going to be used for api calls. It'll look likeus.sentry.io
It's possible to make the api calls against the org-subdomain, but @silo region calls behave differently when the org is in de region :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Making requests to the org subdomain will go to control and should be routed to the right region based on the org slug. However, that does require that all the APIs you're calling have org slugs in them. However, going to the region servers is better than going through the control proxy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, so when i started calling
/users/${userId}/
it required changes again to get the regionUrl.lesson for the front-end if we ever try to get away from that
window.__initialData
jsonThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to work for single-tenant or self-hosted? The
system.base-hostname
orsystem.url-prefix
runtime options have the bare host, and protocol + host respectively. You could use those options to make this work in other environments.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ideally it'll work on ST or Self-hosted.
this is here specifically because our redirect logic is messy. There's some notes here about redirects: #80003
tl/dr: In SaaS if we include the subdomain
acme.sentry.io
in the initial request, but the user needs to login, then we'll forget the redirect target and dump them into /issues. But if we ask for sentry.io/some-page/ then the user will end up atacme.sentry.io/some-page/
in all cases.