question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fetch API cannot load https://dc.services.visualstudio.com/v2/track. Request header field content-encoding is not allowed by Access-Control-Allow-Headers in preflight response.

See original GitHub issue

I am trying to integrate npm’s application insights module (https://www.npmjs.com/package/applicationinsights) into my React js application.

My source for doing this is:

import appInsights from 'applicationinsights';
appInsights.setup(applicationInsightsKey).start();

The problem I got is that in my Chrome Developer tools I can see a preflight request made to https://dc.services.visualstudio.com/v2/track. But in the console I can see the following error:

"Fetch API cannot load https://dc.services.visualstudio.com/v2/track. Request header field content-encoding is not allowed by Access-Control-Allow-Headers in preflight response."

Do you have an idea how can I fix this issue?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
anatoli-ilievcommented, Nov 10, 2016

I can see a call to https://dc.services.visualstudio.com/v2/track with HTTP verb OPTIONS which has a response HTTP 200 - OK.

0reactions
anatoli-ilievcommented, Nov 15, 2016
Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft - Bountysource
Fetch API cannot load https://dc.services.visualstudio.com/v2/track. Request header field content-encoding is not allowed by Access-Control- ...
Read more >
Access-Control-Allow-Headers - HTTP - MDN Web Docs
The Access-Control-Allow-Headers response header is used in response to a preflight request which includes the ...
Read more >
CORS Headers problems | Apple Developer Forums
Hello,. I have a very strange problem, only on safari. I have set up cross-origin access on my api, and it doesn't only...
Read more >
ASP.NET Core CORS middleware doesn't return all headers ...
Im using ASP.NET Core with UseCors() . How do I get it to list all headers specified in WithHeaders() in Access-Control-Allow-Headers ? In ......
Read more >
Fetch: Cross-Origin Requests - The Modern JavaScript Tutorial
E.g. an evil script from website hacker.com could not access the ... to read the Content-Encoding and API-Key headers of the response.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found