Merge pull request #16663 from dotboris/proxy-pass-log-level
Ensure that `http-proxy-middleware` logs requests when log level is set to `debug`
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-proxy-backend': patch
|
||||
---
|
||||
|
||||
Ensure that `@backstage/plugin-proxy-backend` logs the requests that it proxies when log level is set to `debug`.
|
||||
@@ -121,6 +121,11 @@ export function buildMiddleware(
|
||||
|
||||
// Attach the logger to the proxy config
|
||||
fullConfig.logProvider = () => logger;
|
||||
// http-proxy-middleware uses this log level to check if it should log the
|
||||
// requests that it proxies. Setting this to the most verbose log level
|
||||
// ensures that it always logs these requests. Our logger ends up deciding
|
||||
// if the logs are displayed or not.
|
||||
fullConfig.logLevel = 'debug';
|
||||
|
||||
// Only return the allowed HTTP headers to not forward unwanted secret headers
|
||||
const requestHeaderAllowList = new Set<string>(
|
||||
|
||||
Reference in New Issue
Block a user