diff --git a/config.js b/config.js index 42932db..55b1367 100644 --- a/config.js +++ b/config.js @@ -5,6 +5,7 @@ const config = { playgroundEndpoint: "http://127.0.0.1:17000/playground", port: 8080, root: "http://localhost:8080", + trustedProxy: null, auth0: { secret: "INVALID_SECRET", clientId: "", diff --git a/package.json b/package.json index 0953c8a..9c10868 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gisle/rpdata-frontend", - "version": "1.0.4", + "version": "1.0.5", "description": "RPData (www.aiterp.net) frontend/proxy", "main": "./index.js", "scripts": { diff --git a/server.js b/server.js index 7b94f9a..3ed95b9 100644 --- a/server.js +++ b/server.js @@ -54,6 +54,11 @@ lasso.configure({ } }) +// Set trusted proxy +if (config.trustedProxy != null) { + app.set('trust proxy', config.trustedProxy) +} + // Apply middleware app.use(markoExpress()) app.use(session)