XMLHttpRequest cannot load https://mydomainname--c.eu1.visual.force.com/apex/OpportunityOneClickUpdate?id=006D000000ZRwtx. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://mydomainname.my.salesforce.com' is therefore not allowed access.
A Inline Visualforce page is throwing above error when It's calling action function. Even if this visualforce page is opened independently (and not inline) still its giving above error. Strange part is its working fine for almost all customers and not working for just one customer.
For this customer, its failing as request and origin are both from different domain, so its giving access not allowed error. Not sure why request and origin domain are coming as different.
- the request url is mydomainname--c.eu1.visual.force.com
- origin is mydomainname.my.salesforce.com
I tried similar stuff in another org (with mydomain enabled and same settings) and everything is working fine there.
- the request url is mydomainname--c.eu1.visual.force.com
- origin is mydomainname--c.eu1.visual.force.com
Already I've followed other posts too (talking about similar issue), but none really helped wrt how to address my (this post) issue:
- https://salesforce.stackexchange.com/questions/55676/vf-pages-fail-with-xmlhttprequest-error-no-access-control-allow-origin-heade
- XMLHttpRequest cannot load, No 'Access-Control-Allow-Origin' is present
Any clue or feedback on why its failing for few customers (or why the domain and origin are appearing different for certain customers) and not for others? Seems there's something small that I'm missing or some configuration that I need to get enabled (by requesting to Salesforce). Any input in this direction will be really appreciated.