CDN77 is a CDN (Content Delivery Network) service by DataCamp Limited, a UK based company.
As a CDN77 customer, you can make use of their REST API to automate CDN Resource management.
We use the scripts provided here on a daily basis when dealing with content delivery using CDN77 and hope you find them useful as well.
You need Bash, curl, and jq, please run
sudo apt install bash curl jq
to install on Debian or Ubuntu.
In order to use the REST API you need to generate an API token. Run
export CDN77_TOKEN='<token>'
in Bash to make the token available to the scripts.
We currently provide two scripts
-
cdn77-purge-all
allows you to instantly remove all cached content from the CDN for a given site. -
cdn77-prefetch-all
populates the CDN cache for a given site using the information from its sitemap.txt, so that content is already available on all machines in all data centres when clients start sending requests to the CDN.
cdn77-purge-all.sh <site>
cdn77-prefetch-all.sh <site>
<site>
is the site that is on CDN77, e.g. www.mysite.com.
We would love to hear from you! Please contact us at help@threatint.com for feedback and general requests.
Kindly raise an issue in Github if you find a problem in the code.
Release under the MIT License. (see LICENSE)