fix record
This commit is contained in:
@@ -18,5 +18,6 @@ export const serveWeb = async (arg: {
|
|||||||
cache_accept: arg.cache_accept,
|
cache_accept: arg.cache_accept,
|
||||||
high_compression: true,
|
high_compression: true,
|
||||||
headers: !type ? undefined : { "content-type": type },
|
headers: !type ? undefined : { "content-type": type },
|
||||||
|
rewrite: arg.opt?.rewrite,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -30,7 +30,15 @@ type PrasiServer = {
|
|||||||
req: Request;
|
req: Request;
|
||||||
server: Server;
|
server: Server;
|
||||||
mode: "dev" | "prod";
|
mode: "dev" | "prod";
|
||||||
handle: (req: Request) => Promise<Response>;
|
handle: (
|
||||||
|
req: Request,
|
||||||
|
opt?: {
|
||||||
|
rewrite?: (arg: {
|
||||||
|
body: Bun.BodyInit;
|
||||||
|
headers: Headers | any;
|
||||||
|
}) => Bun.BodyInit;
|
||||||
|
}
|
||||||
|
) => Promise<Response>;
|
||||||
index: { head: string[]; body: string[]; render: () => string };
|
index: { head: string[]; body: string[]; render: () => string };
|
||||||
prasi: { page_id?: string };
|
prasi: { page_id?: string };
|
||||||
}) => Promise<Response>;
|
}) => Promise<Response>;
|
||||||
|
|||||||
Reference in New Issue
Block a user