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:
@@ -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)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user