Changes parameter from forward-domain to forward-to
This commit is contained in:
parent
450232e7b7
commit
aa90e66b7c
1 changed files with 5 additions and 5 deletions
10
src/util.js
10
src/util.js
|
|
@ -1,8 +1,9 @@
|
|||
import request from "./certnode/lib/request.js";
|
||||
import crypto from "crypto";
|
||||
import fs from "fs";
|
||||
import { fileURLToPath } from "url";
|
||||
const recordParamDestUrl = 'forward-domain';
|
||||
import {fileURLToPath} from "url";
|
||||
|
||||
const recordParamDestUrl = 'forward-to';
|
||||
const recordParamHttpStatus = 'http-status';
|
||||
let blacklistURL = null;
|
||||
|
||||
|
|
@ -35,8 +36,7 @@ export function isHostBlacklisted(domain = '') {
|
|||
export async function ensureDir(dir) {
|
||||
try {
|
||||
await fs.promises.access(dir, fs.constants.W_OK | fs.constants.O_DIRECTORY);
|
||||
}
|
||||
catch (error) {
|
||||
} catch (error) {
|
||||
await fs.promises.mkdir(dir, {
|
||||
recursive: true
|
||||
});
|
||||
|
|
@ -68,7 +68,7 @@ export async function findTxtRecord(host) {
|
|||
const txtData = parseTxtRecordData(head.data);
|
||||
if (!txtData[recordParamDestUrl]) continue;
|
||||
return {
|
||||
url: txtData[recordParamDestUrl],
|
||||
url: txtData[recordParamDestUrl],
|
||||
httpStatus: txtData[recordParamHttpStatus],
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
editor.link_modal.header
Reference in a new issue