Files
swiss-datashare/frontend/src/pages/api/[...all].tsx

17 lines
457 B
TypeScript
Raw Normal View History

import { NextApiRequest, NextApiResponse } from "next";
import httpProxyMiddleware from "next-http-proxy-middleware";
export const config = {
api: {
bodyParser: false,
externalResolver: true,
},
};
// This function can be marked `async` if using `await` inside
export default (req: NextApiRequest, res: NextApiResponse) =>
httpProxyMiddleware(req, res, {
// You can use the `http-proxy` option
target: "http://localhost:8080",
});