2

I have a VM where I have installed my Angular 6 based UI and Node + Express(I have enable CORS using app.use(cors());) based REST API. Both are hosted on IIS 8.5 in the VM on AWS.

I have 2 laptops when from one of them I am able to access to it works fine, however from another it gives following error.

Access to XMLHttpRequest has been blocked by the CORS policy. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' is present on the request resource.

Can anyone of you guide on what could be an issue. ?

1 Answers1

1
app.use(cors());
app.options('*', cors());

you need to include it before other routes