alias fastly="curl \
-H 'Fastly-Key: <api_key>' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Accept: application/json'"
fastly https://api.fastly.com/service \
-d 'name=<unique_app_name>'
fastly https://api.fastly.com/service/<service_id>/version/1/domain \
-d 'name=<unique_app_name>.global.ssl.fastly.net'
fastly https://api.fastly.com/service/<service_id>/version/1/backend \
-d 'hostname=<unique_app_name>.herokuapp.com&name=<unique_app_name>'
fastly -X PUT https://api.fastly.com/service/<service_id>/version/1/activate
heroku domains:add <unique_app_name>.global.ssl.fastly.net
curl https://<unique_app_name>.global.ssl.fastly.net/__admin/
Condition:
req.request ~ "PURGE" && req.http.Authorization != "Bearer very_secret"