Closed Bug 1407318 Opened 8 years ago Closed 8 years ago

Add permissive Access-Control-Allow-Origin to https://telemetry.mozilla.org/v2/telemetry.js

Categories

(Data Platform and Tools Graveyard :: Operations, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: chutten, Unassigned)

Details

In order to facilitate using telemetry.js within React, which loads modules rather more dynamically than just old-school including <script> tags in <head> like telemetry.js expects, we need a permissive CORS header so that embedding hosts can source and execute telemetry.js on non-TMO hosts.
:armenzg will supply details about how specifically this should be set up and how urgent it is that this be done.
Flags: needinfo?(armenzg)
This is not a super urgent request as it requires other pieces (the telemetry-next-node) to be worked on. Once fixed that I would need this next.
Flags: needinfo?(armenzg)
I was using the telemetry-next-node package from the browser. That's an incorrect usage.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
I've got rid of telemetry-next-node and I believe this will actually work. This is what I tried to do: https://github.com/armenzg/react-telemetry-demo/commit/e886f0b58ce1caaaed8ae7d84dfcf9ef22bb4853 This is the error in the console: > Failed to load https://telemetry.mozilla.org/v2/telemetry.js: No 'Access-Control-Allow-Origin' header > is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. > If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with > CORS disabled.
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
Fixing this should fix all my problems. Please let me know when this could be fixed. What should have worked: https://github.com/armenzg/react-telemetry-demo/commit/07f1fb1a0cf1f837364b0a493e142e780be5789b Vendoring + pointing to localhost: https://github.com/armenzg/react-telemetry-demo/commit/35ab8bb59c4de2d636f2083df4d26a956aef6710
And for the last time! (my apologies for all the noise). I've made the demo work without vendoring. I don't know what was lingering in my project that caused the issue on comment#4.
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → INVALID
Product: Data Platform and Tools → Data Platform and Tools Graveyard
You need to log in before you can comment on or make changes to this bug.