mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-10 12:46:37 +00:00
set trust proxy for int api
This commit is contained in:
@@ -20,8 +20,9 @@ const externalPort = config.getRawConfig().server.integration_port;
|
|||||||
export function createIntegrationApiServer() {
|
export function createIntegrationApiServer() {
|
||||||
const apiServer = express();
|
const apiServer = express();
|
||||||
|
|
||||||
if (config.getRawConfig().server.trust_proxy) {
|
const trustProxy = config.getRawConfig().server.trust_proxy;
|
||||||
apiServer.set("trust proxy", 1);
|
if (trustProxy) {
|
||||||
|
apiServer.set("trust proxy", trustProxy);
|
||||||
}
|
}
|
||||||
|
|
||||||
apiServer.use(cors());
|
apiServer.use(cors());
|
||||||
|
|||||||
Reference in New Issue
Block a user