Hello, We have 2 domains under the same SuiteComme...
# suitecommerce
v
Hello, We have 2 domains under the same SuiteCommerce website (domain1.website.com to domain2.website.com). I am trying to request a URL from domain1.website.com to domain2.website.com but getting a CORS error:
Access to XMLHttpRequest at '<https://domain2.website.com/some-url>' from origin '<https://domain1.website.com>' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: It does not have HTTP ok status.
Is there any way I can allow cross domain requests for our own website domains?
e
It seems you are trying to call one of your services that is active in one domain form the other one, the CORS is not a NetSuite thing, it is more a secure restriction. Have you tried to deploy/activate your service in the other domain? So you do not get the CORS error.
v
@eminero I have the service activated on both domains, but I need to call the other domain’s service. I’m basically trying to log a user in both domains when they log into any one, and for that I’m triggering a Commerce API method ‘logIn’ from the other domain.
e
Interesting! I"m not sure if that is possible.
v
It does seem impossible haha. But I’m trying a few different things. Hoping that I can find a solution!