



Advanced CORS
CORS (Cross-Origin Resource Sharing) is an HTTP-header based mechanism that allows restricted resources (e.g., fonts and JavaScript) on a web page to be requested from another domain outside the domain from which the resource originated.
The Advanced CORS script config allows you to match a pre-configured list of hosts against a specific header in a client request. When there is a match, the script will return the appropriate CORS header using the matched hostname.
To add an Advanced CORS script config to the list of script configs created for your CacheFly services in general, or to associate an Advanced CORS script config with a specific CacheFly service, see Adding and Using Script Configs.

Using the Advanced CORS Script Config
In its configuration when first added as a script config, the Advanced CORS script config contains:
The
default
key, which allows you specify the default behavior of the CDN.The
exceptions
key, which allows you specify exceptions to the default behavior.
The Advanced CORS script config also offers other parameters and values, allowing you to build more detailed configurations: see the accompanying screen capture for this step as an example.

Editing the Advanced CORS Script Config
When you add the Advanced CORS script config to your list of script configs in CacheFly, it will initially display a default configuration as a model for you to adapt to your own requirements.
To edit this default configuration:
Click the blue Edit button to enter edit mode
Modify the script config as you require
Remember to click the blue ✔ Save Changes button to save your changes.
As you edit:
The CacheFly system shows on-screen prompts to help you select acceptable parameters and values.
The blue ✔ Save Changes button will be partially grayed out and will be inactive, until the system confirms that your edits are acceptable.
You can cancel your current edits by clicking the gray Cancel button.
Scroll the graphics in this step horizontally to see all the screens.
Additional Help Topics
As an alternative to creating and managing script configs via the CacheFly user interface as described in this guide, you can also create and manage script configs via API calls.
Click the gray API docs button to access the Script Configs section in CacheFly's online API documentation for further information.