-1

I have a working MEAN stack in AWS Lightsail and I've refractor the API for Serverless Lambda.

I'm getting the "no 'Access-control-allow-origin'" error when I run from Angular locally. (e.g. with 'ng serve' to my Serverless API. I've tried to resolve this by making sure the API side allows all headers and all origins per this documentation. Still failing.

Here's what I know:

  1. Requests to API work fine from Postman
  2. Testing API endpoints from AWS console shows they return requests with the expected headers.
  3. Set up headers to send 'Access-Control-Allow-Origin: '*' from Angular front end on all requests.

The errors I'm getting from the browser are in the attached screenshots.

I can't tell what I'm missing here.

Correct Headers returned in Lambda console

CORS errors in Chrome Browser

0 Answers0