add useProxies config to support x-forwarded headers in express

This commit is contained in:
Art Lowel
2022-09-28 13:10:46 +02:00
parent 241816e836
commit 941e71a75b
5 changed files with 16 additions and 2 deletions

View File

@@ -75,6 +75,10 @@ export function app() {
*/
const server = express();
// Tell Express to trust X-FORWARDED-* headers from proxies
// See https://expressjs.com/en/guide/behind-proxies.html
server.set('trust proxy', environment.ui.useProxies);
/*
* If production mode is enabled in the environment file:
* - Enable Angular's production mode