mirror of
https://github.com/certd/certd.git
synced 2026-04-28 07:57:25 +08:00
fix: 修复1:: 形式的ipv6校验失败的bug
This commit is contained in:
@@ -19,15 +19,16 @@ process.env.VITE_APP_VERSION = require("./package.json").version;
|
||||
process.env.VITE_APP_BUILD_TIME = require("dayjs")().format("YYYY-M-D HH:mm:ss");
|
||||
import * as https from "node:https";
|
||||
|
||||
export default ({ command, mode }) => {
|
||||
export default (req: any) => {
|
||||
const { command, mode } = req;
|
||||
console.log("args", command, mode);
|
||||
const env = loadEnv(mode, process.cwd());
|
||||
const devServerFs: any = {};
|
||||
const devAlias: any[] = [];
|
||||
const base = "./";
|
||||
// if (mode.startsWith("dev")) {
|
||||
// base = "./";
|
||||
// }
|
||||
let base = "./";
|
||||
if (mode.startsWith("dev")) {
|
||||
base = "/certd";
|
||||
}
|
||||
return {
|
||||
base: base,
|
||||
plugins: [
|
||||
@@ -96,6 +97,13 @@ export default ({ command, mode }) => {
|
||||
//忽略证书
|
||||
agent: new https.Agent({ rejectUnauthorized: false }),
|
||||
},
|
||||
"/certd/api": {
|
||||
//配套后端 https://github.com/fast-crud/fs-server-js
|
||||
target: "https://127.0.0.1:7002/api",
|
||||
rewrite: path => path.replace(/^\/certd\/api/, ""),
|
||||
//忽略证书
|
||||
agent: new https.Agent({ rejectUnauthorized: false }),
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user