import { d as defineEventHandler, u as useRuntimeConfig, a as getRouterParam, b as getRequestURL, c as getHeader, p as proxyRequest } from '../../../nitro/nitro.mjs'; import 'node:http'; import 'node:https'; import 'node:events'; import 'node:buffer'; import 'node:fs'; import 'node:path'; import 'node:crypto'; import 'node:url'; import 'better-sqlite3'; function joinURL(base, path) { if (!path) return base; return base.replace(/\/+$/, "") + "/" + path.replace(/^\/+/, ""); } const ____path_ = defineEventHandler((event) => { const config = useRuntimeConfig(); const mpApiBase = config.public.mpApiBase || "https://mp-api.websoft.top"; const path = getRouterParam(event, "path") || ""; const search = getRequestURL(event).search; const target = joinURL(mpApiBase + "/api/cms", path) + search; const tenantId = getHeader(event, "tenantid") || config.public.tenantId; return proxyRequest(event, target, { headers: { TenantId: String(tenantId) } }); }); export { ____path_ as default }; //# sourceMappingURL=_...path_.mjs.map