proxy-backend: cleaner and more informative log messages

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-06-24 11:22:26 +02:00
parent d55cefd2db
commit 13da7be3c1
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-proxy-backend': patch
---
Clean up proxy creation log messages and make them include the mount path.
@@ -148,6 +148,8 @@ export function buildMiddleware(
return fullConfig?.allowedMethods?.includes(req.method!) ?? true;
};
// Makes http-proxy-middleware logs look nicer and include the mount path
filter.toString = () => route;
// Only forward the allowed HTTP headers to not forward unwanted secret headers
const responseHeaderAllowList = new Set<string>(