Add express trustedProxy support

This commit is contained in:
Emma [it/its]@Rory&
2024-10-30 16:28:57 +01:00
parent a56ded91d5
commit 40b356ecdf
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -99,6 +99,10 @@ export class SpacebarServer extends Server {
this.app.set("json replacer", JSONReplacer);
const trustedProxies = Config.get().security.trustedProxies;
if(trustedProxies)
this.app.set("trust proxy", trustedProxies);
this.app.use(CORS);
this.app.use(BodyParser({ inflate: true, limit: "10mb" }));