cloudflare: use new api token auth scheme.

Use Cloudflare's new API token authentication method to talk to
Cloudflare. This lets us use API tokens with minimal privileges set.

https://blog.cloudflare.com/api-tokens-general-availability/
This commit is contained in:
evazion
2019-12-02 16:45:32 -06:00
parent 27a1a90cf3
commit 86a09a322f
2 changed files with 12 additions and 11 deletions

View File

@@ -630,16 +630,16 @@ module Danbooru
"https://#{hostname}"
end
# Cloudflare data
def cloudflare_email
# Cloudflare API token. Used to purge URLs from Cloudflare's cache when a
# post is replaced. The token must have 'zone.cache_purge' permissions.
# https://support.cloudflare.com/hc/en-us/articles/200167836-Managing-API-Tokens-and-Keys
def cloudflare_api_token
end
# The Cloudflare zone ID. This is the domain that cached URLs will be purged from.
def cloudflare_zone
end
def cloudflare_key
end
def recommender_server
end