mirror of
https://github.com/fosrl/pangolin.git
synced 2025-07-24 20:55:04 +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() {
|
||||
const apiServer = express();
|
||||
|
||||
if (config.getRawConfig().server.trust_proxy) {
|
||||
apiServer.set("trust proxy", 1);
|
||||
const trustProxy = config.getRawConfig().server.trust_proxy;
|
||||
if (trustProxy) {
|
||||
apiServer.set("trust proxy", trustProxy);
|
||||
}
|
||||
|
||||
apiServer.use(cors());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue