2020-09-12 21:53:41 +00:00
|
|
|
import { createProxyMiddleware } from 'http-proxy-middleware';
|
|
|
|
|
|
|
|
export const config = {
|
|
|
|
api: {
|
|
|
|
bodyParser: false,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2020-09-14 09:32:01 +00:00
|
|
|
const API_ENDPOINT = process.env.NEXT_PUBLIC_ENTE_ENDPOINT || "http://api.staging.ente.io";
|
|
|
|
|
2020-09-12 21:53:41 +00:00
|
|
|
export default createProxyMiddleware({
|
2020-09-14 09:32:01 +00:00
|
|
|
target: API_ENDPOINT,
|
2020-09-12 21:53:41 +00:00
|
|
|
changeOrigin: true,
|
|
|
|
pathRewrite: { '^/api': '/' },
|
|
|
|
});
|