hi
i was trying to add more than one domain in nginx , it works with one domain but multiple not
one domain : add_header 'Access-Control-Allow-Origin' 'ww.xyz.com';
multiple format didn’ works for me … like add_header 'Access-Control-Allow-Origin' 'ww.xyz.com, sub.xyz.com '; add_header 'Access-Control-Allow-Origin' 'ww.xyz.com sub.xyz.com ';
the solution was :
Inside frappe bench folder write : nano config/nginx.conf
Just throwing it out there. I had this multitenant setup serving a few sites and wanted to enable cors just for a few sites.
Let’s say I had a couple sites - site1.com and site2.com (assuming that the site name is the same as the host where it’s reachable at). And I wanted to enable cors from https://some.web.app just for site1.com. I ended up using the following map -