Signed-off-by: ale <ale@manalejandro.com>
Este commit está contenido en:
ale
2025-10-27 16:14:35 +01:00
padre 28eea2a7ae
commit ce25ebc804
Se han modificado 2 ficheros con 16 adiciones y 1 borrados

Ver fichero

@@ -191,7 +191,7 @@ export class OVHService {
// Sort records by type for better readability
const sortedRecords = [...records].sort((a, b) => {
const typeOrder = { SOA: 0, NS: 1, A: 2, AAAA: 3, CNAME: 4, MX: 5, TXT: 6, SRV: 7 };
const typeOrder = { SOA: 0, NS: 1, A: 2, AAAA: 3, CNAME: 4, MX: 5, TXT: 6, SPF: 7, SRV: 8 };
return (typeOrder[a.fieldType] || 99) - (typeOrder[b.fieldType] || 99);
});
@@ -219,6 +219,12 @@ export class OVHService {
: record.target;
line = `${subdomain}\t${ttl}\tIN\tTXT\t${txtValue}`;
break;
case 'SPF':
const spfValue = record.target.includes(' ') && !record.target.startsWith('"')
? `"${record.target}"`
: record.target;
line = `${subdomain}\t${ttl}\tIN\tSPF\t${spfValue}`;
break;
case 'SRV':
const priority_srv = record.priority || 0;
const weight = record.weight || 0;
@@ -333,6 +339,11 @@ export class OVHService {
const txtValue = parts.slice(idx).join(' ');
recordData.target = txtValue.replace(/^"|"$/g, '');
break;
case 'SPF':
// Join remaining parts and remove quotes
const spfValue = parts.slice(idx).join(' ');
recordData.target = spfValue.replace(/^"|"$/g, '');
break;
case 'SRV':
recordData.priority = parseInt(parts[idx++]);
recordData.weight = parseInt(parts[idx++]);