alphagov/fabric-scripts — pull request #77 by ajlanghorn (2014-11-27 18:02:43+00:00)
Title: FOR DISCUSSION: Remove assets host from hostname array

Assets are now fronted by CloudFlare, who don't use the same HTTP method to
allow purging. Fastly expect the PURGE method whereas CloudFlare expect the
DELETE method (see
https://www.cloudflare.com/docs/next/#zone-purge-individual-files).

Purging individual content from CloudFlare will require a bit more of a
think, as there are some fundamental changes regarding authorisation that
we don't need to consider in the Fastly purge implementation, namely:

- Zone ID is required in the endpoint
- Email and API key need to be sent as X-Auth-Email and X-Auth-Key headers
respectively

These details aren't available to everyone, so we need to either sort user
permissions out (something like a 2nd-line-support@ account like we have for
Fastly deployment would work), or work it in to Jenkins in a way that the
email and API key aren't exposed to those who don't need access to them.