Merge pull request #6188 from backstage/rugvip/cleanlog

proxy-backend: cleaner and more informative log messages
This commit is contained in:
Patrik Oldsberg
2021-06-24 11:41:24 +02:00
committed by GitHub
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>(