0

I'm trying to access STREAK Api using angular. When i'm sending the request to Streak i'm getting a CORS Policy error but when trying to access the same request using Node.js i'm getting the response.

So my question is, why is that happening? both the client and the server are hosted on localhost

KLTR
  • 1,263
  • 2
  • 14
  • 37

1 Answers1

1

For security reasons, browsers restrict cross-origin HTTP requests initiated from scripts.

This doesn't have anything to do with angular or any other javascript framework.

You can read more about CORS here

pachonjcl
  • 723
  • 4
  • 11
  • A related topic here https://stackoverflow.com/questions/43871637/no-access-control-allow-origin-header-is-present-on-the-requested-resource-whe – Michael McGreal Jun 09 '22 at 02:52