General:
This guide describes how to deploy the Source Defense security platform using a CDN-to-CDN configuration. The setup involves:
Configuring your CDN to cache Source Defense files as explained below
Placing the Source Defense script at the top of the
<HEAD>
element on all relevant pages (Please follow this guide for directions: Source Defense code snippet deployment)
Important:
You will need your unique{SOURCEDEFENSE_CACHING_HOOK}
(a 6-letter identifier) to complete this configuration.
If you do not have this value, contact Source Defense Support.
Configure your CDN:
To cache Source Defense files on your CDN, complete the following steps.
-
Create a Public Folder for Cached Files
-
On your CDN, create a folder path for the caching hook:
https://yourcdn.example.com/{SOURCEDEFENSE_CACHING_HOOK}/This folder will mirror Source Defense resources from their origin.
-
-
Define a Caching Rule
Create a caching rule in your CDN with the following mapping:-
This rule tells your CDN to fetch and serve Source Defense files from Source Defense’s CDN.
-
CDN Caching Policy
Ensure the following settings are applied:- Cache Duration: 10 minutes
- Stale Content Policy: Enable stale content caching (e.g., Stale-While-Revalidate)
- Header Preservation: Do not alter headers coming from Source Defense’s origin
-
Notify Source Defense
-
Once your CDN path is live, send the final URL to Source Defense to complete the configuration: https://yourcdn.example.com/{SOURCEDEFENSE_CACHING_HOOK}/This allows Source Defense to validate and activate your caching setup and deliver the Source Defense script.
-