icynet-admin/server/proxy.ts

11 lines
318 B
TypeScript
Raw Normal View History

2022-08-29 18:09:28 +00:00
import httpProxy from 'http-proxy';
export const proxy = httpProxy.createProxyServer({
/**
* Get the actual back-end service url from env variables.
* We shouldn't prefix the env variable with NEXT_PUBLIC_* to avoid exposing it to the client.
*/
target: process.env.SERVER_URL,
autoRewrite: false,
});