With its main objective of providing clients with an increasingly efficient experience, VTEX will discontinue Master Data CORS support starting on September 23rd. In order for your store to avoid any operational and browsing failure, follow this article’s instructions.
Click here for more on CORS.
This change has two objectives:
Remove an unnecessary call, making the service more efficient and, consequently, improving the customer’s experience when browsing on the site;
Since the OPTIONS method is not cached by the CDN, your store may suffer from interruptions in service due to excessive use (throttling). We seek to avoid this unforeseen behavior.
In the example below, we have illustrated a wrong way to perform a Master Data requisition using CORS (jQuery example):
You’ll notice that the requisition in this example is performed using the absolute path, meaning that the call URL contains both the protocol (https) and domain (api.vtex.com). This format will no longer work starting from the above-mentioned date.
Below we have another example highlighting the correct way to perform the same requisition:
Observe that in call protocol and domain in the last example are not present. The browser will therefore not use CORS and perform the requisition through the site’s own protocol and domain, according to the correct format. Also note that the “/api” folder was added to the endpoint.
The store may be impacted in a variety of ways, from a simple resource malfunction to sales interruptions, meaning that the impact will be proportional to the purchasing flow’s dependence on these Master Data requisitions.
Kindly share this article with your store’s front-end responsible developer. For more detailed information on this topic, get in touch with our customer service. We are ready to assist you with this revamping.