Affects Version/s: 6.2.X EE, 7.0.0 DXP SP2, Master
Component/s: Sites Administration > Sites
In case we are using a virtualhost in a site, and that virtualhost is a subdomain of the portal domain, if we access to that site vía the friendlyURL instead of the virtualhost, we'll see a CORS error in the moment of adding a new portlet, check portlet configuration, etc.
Steps to reproduce
1.- Start Master
2.- Add a new instance with the virtualhost "my-instance.com".
3.- Access to the new instance.
4.- Create 2 sites:
4.a.- One called "newdomain" with virtualhost (SiteURL --> Public Pages): "newdomain.com"
4.b.- Other called "subdomain" with virtualhost (SiteURL --> Public Pages): "subdomain.my-instance.com"
5.- Add just a welcome page in every site.
6.- Access to the FriendlyURLs of both sites (my-instance.com:8080/web/newdomain and my-instance.com:8080/web/subdomain) and try to add a Web Content Display
You can add it in both sites
You can add it in "newdomain" but not in "subdomain". If you open the browser console you'll see CORS error.
If you 'inspect' the plus button to add a new portlet, you can see the link is pointing to is: subdomain.my-instance.com:8080/... even when you are accessing through my-instance.com:8080/web/subdomain which is the reason of the CORS error.