0

I'm getting Cross-Origin Request Blocked:

The Same Origin Policy disallows reading the remote resource at http://localhost:8092/authenticate. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

This error occurs while executing an Angular 8 project when I click the login button.

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
lotus
  • 49
  • 5
  • Does this answer your question? [How does Access-Control-Allow-Origin header work?](https://stackoverflow.com/questions/10636611/how-does-access-control-allow-origin-header-work) – mbojko Jul 23 '20 at 09:05

1 Answers1

0

You need to add the Access-Control-Allow-Origin: * header to the server endpoint (Note: this allows access from anywhere if used in production)

Rob Bailey
  • 920
  • 1
  • 8
  • 23