diff --git a/cfddns/cfddns/scripts/cfddns_config.sh b/cfddns/cfddns/scripts/cfddns_config.sh index d99457c..0512f1b 100755 --- a/cfddns/cfddns/scripts/cfddns_config.sh +++ b/cfddns/cfddns/scripts/cfddns_config.sh @@ -29,15 +29,13 @@ get_bol() { get_record_response() { curl -kLsX GET "https://api.cloudflare.com/client/v4/zones/$cfddns_zid/dns_records?type=$get_type&name=${cfddns_name_domain}&order=type&direction=desc&match=all" \ - -H "X-Auth-Email: $cfddns_email" \ - -H "X-Auth-Key: $cfddns_akey" \ + -H "Authorization: Bearer $cfddns_akey" \ -H "Content-type: application/json" } update_record() { curl -kLsX PUT "https://api.cloudflare.com/client/v4/zones/$cfddns_zid/dns_records/$cfddns_id" \ - -H "X-Auth-Email: $cfddns_email" \ - -H "X-Auth-Key: $cfddns_akey" \ + -H "Authorization: Bearer $cfddns_akey" \ -H "Content-Type: application/json" \ --data '{"type":"'$get_type'","name":"'${cfddns_name_domain}'","content":"'$update_to_ip'","ttl":'$cfddns_ttl',"proxied":'$(get_bol)'}' }