What is CORS and How to Manage?

Websites usually contain applications, images, fonts, and many other sources hosted in different locations (servers) on the internet. CORS (Cross-Origin Resource Sharing) allows resource sharing between different origins, it is a mechanism that allows such resources hosted on different servers to be received with additional domain names. It aims to stretch the restrictions of the Same-Origin-Policy (SOP); prevent the delivery of content from different Origins by using additional domain names due to security measures, with legal methods.

Medianova CDN supports CORS for zones created for Large and Small Objects and Stream zones. You can manage this feature, in order to allow content delivery from different Origin servers with the same domain name, by following the steps below.

  1. Click the Zones button on the left of the panel screen which you log in with your username and password on Medianova CDN.

  2. Click the Manage> Settings button to the right of the Zone which you want to manage the CORS feature from the zone list you previously created for the CDN service. This feature can be managed for zones created for Large and Small Objects and Stream zones.
  3. Using the CORS Header area on the screen that opens, you can activate this feature with the Yes button or deactivate it with the No button. If the No option is active as below, content from different sources with different domain names cannot be received. When content is requested from different sources, it is not delivered and is seen as a CORS error on the Development Tools console screen.
  4. When the Yes option is selected, content delivery from different sources is allowed over additional domains. More than one additional domain name can be defined or previously defined additional domain names can be deleted. If no value is entered in the domain name field, the default setting is entered as *, and requests from all sites and domains are allowed. This operation is not recommended as it may create security gaps.

  5. The settings can be saved using the Update button. Please note that it may take a few minutes for the feature to be active.

Was this post helpful?