Question

How to Disable CORS for NodeJS Nginx Ubuntu 20.04 Server

Hello I am using Nginx with NodeJS on Ubuntu 20.04 to set up a reverse proxy server to host a NodeJS Typescript API using PM2.

I have enabled CORS in the Nginx default file as well as in the TS file headers. However when I try to make a http request to the API in my Angular front-end I still get CORS error.

The API is hosting fine and can be accessed in the web browser to get a simple response.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer