link-stack/pages/api/proxy/[[...path]].ts

19 lines
404 B
TypeScript
Raw Normal View History

2022-12-02 10:55:56 +00:00
import { createProxyMiddleware } from "http-proxy-middleware";
import { NextApiRequest, NextApiResponse } from "next";
const proxy = createProxyMiddleware({
target: "https://help.cdr.link",
changeOrigin: true,
xfwd: false,
pathRewrite: { '^/zammad': '' }
});
export default proxy;
export const config = {
api: {
bodyParser: false,
externalResolver: true,
},
};