Hi, I am running Nginx version: nginx/1.16.1 on CentOS Linux release 7.8.2003 (Core) and have hosted react.js javascript 16.13.1 and Drupal CMS Framework 8.7.8. https://tmobilereactdrupal.mydomain.com (react.js javascript 16.13.1) which in turn talks to https://tmobilereactdrupal.mydomain.com:8080 (drupal framework version 8.7.8). Both react js on port 443 (frontend) and drupal cms on port 8080 (backend) are running on the same Nginx webserver.
When I hit https://tmobilereactdrupal.mydomain.com (react.js framework frontend on the port 443) connects to https://tmobilereactdrupal.mydomain.com:8080 (Drupal CMS 8.7.8 backend on the port 8080) I am encountering the below error in Developer tools console which is a plugin in the browser. Access to XMLHttpRequest at ‘ > https://tmobilereactdrupal.mydomain.com:8080/oauth/token’ from origin ‘ > https://tmobilereactdrupal.mydomain.com’ has been blocked by CORS policy: > No ‘Access-Control-Allow-Origin’ header is present on the requested > resource. I have attached both the Nginx config file for the react.js framework (frontend) and Drupal CMS 8.7.8 backend. Any help will be highly appreciated. I have added add_header 'Access-Control-Allow-Origin' '*' always; in nginx.conf and is not honoring the settings. I look forward to hearing from you. Thanks in advance. Best Regards, Kaushal
reactjsnginx.conf
Description: Binary data
drupalcmsnginx.conf
Description: Binary data
_______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx