1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Cloudflare Redirects (#119)

* function sig

* sig

* some custom record infrastructure

* CLOUDFLARE REDIRECTS!

* comments out

* guarding redirects behind provider metadata to manage

* catch commas in js to ensure proper encoding.

* gen

* small fix

* revendor otto

* docs
This commit is contained in:
Craig Peterson
2017-05-19 14:15:57 -04:00
committed by GitHub
parent a355b8e438
commit f1a0d65198
18 changed files with 471 additions and 99 deletions

View File

@@ -303,3 +303,21 @@ function num2dot(num)
}
return d;
}
// CUSTOM, PROVIDER SPECIFIC RECORD TYPES
function CF_REDIRECT(src, dst) {
return function(d) {
if (src.indexOf(",") !== -1 || dst.indexOf(",") !== -1){
throw("redirect src and dst must not have commas")
}
addRecord(d,"CF_REDIRECT","@",src+","+dst)
}
}
function CF_TEMP_REDIRECT(src, dst) {
return function(d) {
if (src.indexOf(",") !== -1 || dst.indexOf(",") !== -1){
throw("redirect src and dst must not have commas")
}
addRecord(d,"CF_TEMP_REDIRECT","@",src+","+dst)
}
}