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

pass token if server is on same domain as current host #22

Merged
merged 3 commits into from
Aug 31, 2017

Conversation

dmfenton
Copy link
Contributor

No description provided.

!!url.toLowerCase().match(`arcgis.com/${id}/arcgis/rest`) ||
/utility\w+\.arcgis\.com\/sharing\/servers\/\w{32}\/rest\/services\/Hosted/i.test(url)
);
if (location && location.host && hostsMatch(location.host, url)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not wild about using location in a utility - ideally we'd pass this in... but it's hard to know where to draw that line - this is nice in that it's encapsulated, but - it's also impossible to test this part of the code. I'll let you make the call

@dmfenton dmfenton merged commit 85ba53f into master Aug 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants