Go Back To Code List
[NGINX]
Current Code Entry
Go Back To Code List
[NGINX]

CORS - No ''Access-Control-Allow-Origin'' header is present on the requested resource.

Article Entry Date: July 5,2025 @ 09:18:08 / Last Updated On: July 5,2025 @ 09:18:08
This article is about NGINX only.

I first encountered this issue on April 16-17, 2025.
On May 24, 2025, I resolved the issue for Local Streams (Within my Network)

(Change demo.domain.com to your domain)

For Local, navigate to the following folder
/etc/nginx/nginx.conf
Add the following to the http section



And then, when I went to test it outside the network, it gave me the CORS error again.
So, on July 5, 2025, I figured out what I needed to do to get it to work for outside the network.
I copied the code from above and started placing it in different files, restarting NGINX until I got it working.

To have it work from outside your network.
Navigate to the following folder.
/usr/local/nginx/conf/nginx.conf
Add the following to the Server {9443} section along with your SSL Information.