Skip to content
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

Merged
merged 7 commits into from
Mar 24, 2020

Conversation

nickpeihl
Copy link
Member

@nickpeihl nickpeihl commented Jan 2, 2020

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 strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@nickpeihl nickpeihl added [Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation v8.0.0 v7.6.0 v7.5.2 labels Jan 2, 2020
@nickpeihl nickpeihl requested a review from a team as a code owner January 2, 2020 18:04
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-gis (Team:Geo)

@nickpeihl nickpeihl requested a review from a team January 2, 2020 18:05
@jportner jportner self-requested a review January 2, 2020 19:43
Copy link
Contributor

@jportner jportner left a 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!

…utils.js

Co-Authored-By: Joe Portner <5295965+jportner@users.noreply.github.com>
@nickpeihl
Copy link
Member Author

@elasticmachine merge upstream

@jportner jportner self-requested a review January 6, 2020 16:16
@nickpeihl
Copy link
Member Author

This is blocked by #53904 as we want to test this in IE11 so we can comfortably backport.

@nickpeihl
Copy link
Member Author

@elasticmachine merge upstream

@nickpeihl nickpeihl removed the v7.5.2 label Jan 15, 2020
Copy link
Contributor

@thomasneirynck thomasneirynck left a 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

@nickpeihl nickpeihl added v7.7.0 and removed v7.6.0 labels Feb 4, 2020
@nickpeihl
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@nickpeihl nickpeihl merged commit 72afbbb into elastic:master Mar 24, 2020
@nickpeihl nickpeihl deleted the maps/fix-crossorigin-sprites branch March 24, 2020 21:30
nickpeihl added a commit that referenced this pull request Mar 24, 2020
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Deprecated-Use Team:Presentation]Team:Geo Former Team Label for Geo Team. Now use Team:Presentation release_note:fix v7.7.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Maps] Icons fail to load in Safari when Kibana is behind oauth proxy
5 participants