mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-29 23:25:58 +02:00
set trust proxy for int api
This commit is contained in:
parent
fb5010a2b5
commit
34180ca454
1 changed files with 3 additions and 2 deletions
|
@ -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());
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue