-
Notifications
You must be signed in to change notification settings - Fork 235
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
should prefix.js fall back to https if loaded from file:// uri? #93
Comments
@gardnerjr I don't see any issues of top of my head. |
The only reason I can think of is to ensure that an https page talks to AI over https (browsers can block https page talking to http resources). An http page could be more efficient in its bandwidth use if it used http to talk to AI as well, but it wouldn't be terrible if AI scripts could always used HTTPS. |
i think right now you can repro this in a desktop webpage. create a "page.html" on your windows desktop. paste a valid snippet with a valid ikey into it. open it with the browser via first, because the browser will fail to load the ai javascript from a file://uri. Then, modify the snippet to use https:// to get the ai javascript. to fix it, you also have to add:
to your config, to force the sdk to send data with a proper protocol, as the ai sdk doesn't have one, it is just |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
from this stack overflow: http://stackoverflow.com/questions/33952511/microsoft-application-insights-on-cordova-requests-goes-to-file/34230709#34230709
the default prefix/snippet doesn't specify a protocol, falling back to whatever the page got loaded from (presumably so http gets the ai script also via http, and https sites get the script via https so there's no "unsecure content" errors or warnings.
however, if you use the example from a file:// based source, like a cordova app in the stack overflow question above, it also tries to load / submit data to:
file:// dc.services.visualstudio.com/v2/track
instead of using https. should there be code in the snippet to fall back to https when sending data to DC even if the source was loaded from a file:// uri?
The text was updated successfully, but these errors were encountered: