fix build
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
hamid zarghami
2026-06-28 09:11:12 +03:30
parent 3e7cc74d57
commit 6324cabb32
+4 -4
View File
@@ -1,5 +1,5 @@
import type { IncomingMessage, ServerResponse } from "node:http";
import type { ClientRequest, IncomingMessage as ProxyIncomingMessage } from "node:http";
import type { IncomingMessage as ProxyIncomingMessage } from "node:http";
import type { ProxyOptions } from "vite";
import { MENU_SITE_ORIGIN, isMenuSlugProxyPath, stripMenuPreviewCacheParam, toMenuSitePath } from "./src/config/menuPreview";
@@ -65,9 +65,9 @@ export const getMenuSiteTargetUrl = (url: string) => {
return `${MENU_SITE_ORIGIN}${menuPath}${stripMenuPreviewCacheParam(search)}`;
};
export const createMenuSlugProxyAgent = () => ({
configure: (proxy: { on: (event: string, handler: (...args: unknown[]) => void) => void }) => {
proxy.on("proxyReq", (proxyReq: ClientRequest) => {
export const createMenuSlugProxyAgent = (): { configure: NonNullable<ProxyOptions["configure"]> } => ({
configure: (proxy) => {
proxy.on("proxyReq", (proxyReq) => {
proxyReq.removeHeader("origin");
});
proxy.on("proxyRes", stripPreviewPageHeaders);