feat: allow insecure connections in cdnfly, goedge, powerdns

This commit is contained in:
Fu Diwei
2025-05-09 16:35:58 +08:00
parent 5abdb577fb
commit 26359b9d16
25 changed files with 147 additions and 86 deletions

View File

@@ -1,5 +1,5 @@
import { useTranslation } from "react-i18next";
import { Form, type FormInstance, Input } from "antd";
import { Form, type FormInstance, Input, Switch } from "antd";
import { createSchemaFieldRule } from "antd-zod";
import { z } from "zod";
@@ -38,6 +38,7 @@ const AccessFormGoEdgeConfig = ({ form: formInst, formName, disabled, initialVal
.min(1, t("access.form.goedge_access_key.placeholder"))
.max(64, t("common.errmsg.string_max", { max: 64 }))
.trim(),
allowInsecureConnections: z.boolean().nullish(),
});
const formRule = createSchemaFieldRule(formSchema);
@@ -80,6 +81,13 @@ const AccessFormGoEdgeConfig = ({ form: formInst, formName, disabled, initialVal
>
<Input.Password autoComplete="new-password" placeholder={t("access.form.goedge_access_key.placeholder")} />
</Form.Item>
<Form.Item name="allowInsecureConnections" label={t("access.form.goedge_allow_insecure_conns.label")} rules={[formRule]}>
<Switch
checkedChildren={t("access.form.goedge_allow_insecure_conns.switch.on")}
unCheckedChildren={t("access.form.goedge_allow_insecure_conns.switch.off")}
/>
</Form.Item>
</Form>
);
};