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

fail to load heap-{id}.js when the website is under http #642

Open
jovezhong opened this issue Oct 28, 2021 · 0 comments
Open

fail to load heap-{id}.js when the website is under http #642

jovezhong opened this issue Oct 28, 2021 · 0 comments

Comments

@jovezhong
Copy link

Greetings,

The issue is if the website is running under http instead of https (which could be common at development phase), the heap integration will be broken, since it will use the current website schema to load the heap.js from CDN. However while issuing the http://cdn.heapanalytics.com/js/heap-"+e+".js, this will be an error (actually 302 redirect to https://cdn.heapanalytics.com/js/heap-"+e+".js), but the browser (at least for Mac Safari) will fail to load such file. The fix is easy, always load the heap.js from CDN via https

.tag('<script src="//cdn.heapanalytics.com/js/heap-{{ appId }}.js">'));

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

No branches or pull requests

1 participant