mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-25 18:53:36 +00:00
Add trust proxy to the internal api
Fix access logs not having the right ip
This commit is contained in:
@@ -16,6 +16,11 @@ const internalPort = config.getRawConfig().server.internal_port;
|
||||
export function createInternalServer() {
|
||||
const internalServer = express();
|
||||
|
||||
const trustProxy = config.getRawConfig().server.trust_proxy;
|
||||
if (trustProxy) {
|
||||
internalServer.set("trust proxy", trustProxy);
|
||||
}
|
||||
|
||||
internalServer.use(helmet());
|
||||
internalServer.use(cors());
|
||||
internalServer.use(stripDuplicateSesions);
|
||||
|
||||
Reference in New Issue
Block a user