This commit is contained in:
2025-12-15 23:02:06 +08:00
parent f3f1a1d058
commit 7d4bc37c09
5 changed files with 43 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ import { LocalProxy, LocalProxyOpts } from './index.ts';
import http from 'node:http';
import { fileProxy } from './proxy/file-proxy.ts';
const localProxy = new LocalProxy({});
let home = '/root/center';
let home = '/root/home';
export const initProxy = (data: LocalProxyOpts & { home?: string }) => {
localProxy.pagesDir = data.pagesDir || '';
localProxy.watch = data.watch ?? false;

View File

@@ -1,6 +1,6 @@
export type ProxyInfo = {
/**
* 代理路径, 比如/root/center, 匹配的路径
* 代理路径, 比如/root/home, 匹配的路径
*/
path?: string;
/**