-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Maps] Fix cross origin error for icon spritesheets when Kibana secured via OAuth proxy #53896
[Maps] Fix cross origin error for icon spritesheets when Kibana secured via OAuth proxy #53896
Conversation
Pinging @elastic/kibana-gis (Team:Geo) |
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.
One small change and then this LGTM!
x-pack/legacy/plugins/maps/public/connected_components/map/mb/utils.js
Outdated
Show resolved
Hide resolved
…utils.js Co-Authored-By: Joe Portner <5295965+jportner@users.noreply.github.com>
@elasticmachine merge upstream |
This is blocked by #53904 as we want to test this in IE11 so we can comfortably backport. |
@elasticmachine merge upstream |
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.
lgtm when green CI
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
…ed via OAuth proxy (#53896) (#61171) * Set crossOrigin to anonymous only on requests from external hosts * Update x-pack/legacy/plugins/maps/public/connected_components/map/mb/utils.js Co-Authored-By: Joe Portner <5295965+jportner@users.noreply.github.com> * 🙇♂️ Lint Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Joe Portner <5295965+jportner@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Summary
Fixes #53730.
When Kibana is secured via an oauth proxy (as demonstrated in this blog post), the icon spritesheet in Maps fails to load in Safari. Safari redirects the request for the spritesheet through the oauth which returns a cross origin error.
This PR only applies the
crossOrigin='Anonymous'
parameter if the requested spritesheet is on another host (for example, when loading a basemap).Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.[ ] Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorials[ ] Unit or functional tests were updated or added to match the most common scenariosThis was checked for keyboard-only and screenreader accessibilityFor maintainers