Deploying to AWS and hosting the API on a subdomain

@jmcmullen Hi.

When I looked at CORS a little while ago in

I set it to:

      origin: '*',
      credentials: true,

So, while your origin makes sense, I’d try adding the credentials since the available options listed here (and there are many):

say that

credentials: Configures the Access-Control-Allow-Credentials CORS header. Set to true to pass the header, otherwise it is omitted.

and you seem to be getting a message about

No ‘Access-Control-Allow-Origin’ header is present

So, perhaps that will set and pass the header it expects even though:

origin : Configures the Access-Control-Allow-Origin CORS header

But maybe a different value is needed like

  • Boolean - set origin to true to reflect the request origin, as defined by req.header('Origin') , or set it to false to disable CORS.

Let us know how it works out :slight_smile:

1 Like