Merge pull request #3 from free-domains/make-txt-object

feat(txt): make TXT records objects
This commit is contained in:
William Harrison authored and GitHub committed 2023-02-01 11:19:25 +08:00
commit 9ce505ff67
9 files changed
+45 -14

No files matched your search

+2 -2
View File
@@ -17,7 +17,7 @@ var proxy = {
* domain: string,
* subdomain: string,
* owner?: { email?: string },
* records: { A?: string[], AAAA?: string[], CNAME?: string, MX?: object[], NS?: string[], TXT?: string[] },
* records: { A?: string[], AAAA?: string[], CNAME?: string, MX?: object[], NS?: string[], TXT?: object[] },
* proxied: boolean
* }}[]}
*/
@@ -96,7 +96,7 @@ for (var idx in domains) {
if (domainData.records.TXT) {
for (var txt in domainData.records.TXT) {
commit[domainData.domain].push(
TXT(domainData.subdomain, domainData.records.TXT[txt])
TXT(domainData.records.TXT[txt].name + "." + domainData.subdomain, domainData.records.TXT[txt].value)
);
}
}
@@ -5,7 +5,12 @@
"subdomain": "_github-challenge-free-domains-org",
"records": {
"TXT": ["d9d7d3b3cd"]
"TXT": [
{
"name": "@",
"value": "d9d7d3b3cd"
}
]
},
"proxied": false
@@ -5,7 +5,12 @@
"subdomain": "_github-challenge-free-domains-org",
"records": {
"TXT": ["b5822037c3"]
"TXT": [
{
"name": "@",
"value": "b5822037c3"
}
]
},
"proxied": false
@@ -5,7 +5,12 @@
"subdomain": "_github-pages-challenge-free-domains",
"records": {
"TXT": ["2b1d1bccb97af4e747c6f48dd903ff"]
"TXT": [
{
"name": "@",
"value": "2b1d1bccb97af4e747c6f48dd903ff"
}
]
},
"proxied": false
@@ -5,7 +5,12 @@
"subdomain": "_github-pages-challenge-free-domains",
"records": {
"TXT": ["48ff7988789c1fb49dd4be28c0fe70"]
"TXT": [
{
"name": "@",
"value": "48ff7988789c1fb49dd4be28c0fe70"
}
]
},
"proxied": false
+6 -1
View File
@@ -36,7 +36,12 @@
}
],
"TXT": ["v=spf1 include:_spf.mx.cloudflare.net ~all"]
"TXT": [
{
"name": "@",
"value": "v=spf1 include:_spf.mx.cloudflare.net ~all"
}
]
},
"proxied": false
+6 -1
View File
@@ -36,7 +36,12 @@
}
],
"TXT": ["v=spf1 include:_spf.mx.cloudflare.net ~all"]
"TXT": [
{
"name": "@",
"value": "v=spf1 include:_spf.mx.cloudflare.net ~all"
}
]
},
"proxied": false
+3 -3
View File
@@ -51,9 +51,9 @@
"TXT": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 255
"type": "object",
"minProperties": 2,
"maxProperties": 2
}
}
},
+4 -3
View File
@@ -44,6 +44,7 @@
"type": "object",
"minLength": 3,
"pattern": "^[a-z0-9._-]{3,}$",
"minProperties": 2,
"maxProperties": 2
}
},
@@ -58,9 +59,9 @@
"TXT": {
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 255
"type": "object",
"minProperties": 2,
"maxProperties": 2
}
}
},