javascript - Azure Applications Insights node js module not working - Fetch API cannot load error -
i trying integrate npm's application insights module (https://www.npmjs.com/package/applicationinsights) react js application.
my source doing is:
import appinsights 'applicationinsights'; appinsights.setup(applicationinsightskey).start();
the problem got in chrome developer tools can see preflight request made https://dc.services.visualstudio.com/v2/track. in console can see following error:
"fetch api cannot load https://dc.services.visualstudio.com/v2/track. request header field content-encoding not allowed access-control-allow-headers in preflight response."
do have idea how can fix issue?
the node.js module using ai sdk node.js server. , react js applications client applications in javascript, technically different.
please try use applicationinsights-js.
additionally, can refer https://azure.microsoft.com/en-us/documentation/articles/app-insights-web-track-usage/ more info.
Comments
Post a Comment