Merge pull request #30853 from amintong/fix_proxy

fix(proxy-backend): correct rewrite rule to avoid extra subpath
This commit is contained in:
Patrik Oldsberg
2025-08-11 09:20:52 +02:00
committed by GitHub
2 changed files with 6 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-proxy-backend': patch
---
correct rewrite rule to avoid extra subpath in proxy path
+1 -2
View File
@@ -292,8 +292,7 @@ export async function createRouter(
logger: options.logger,
};
const externalUrl = await options.discovery.getExternalBaseUrl('proxy');
const { pathname: pathPrefix } = new URL(externalUrl);
const pathPrefix = '/api/proxy';
const proxyConfig: ProxyConfig = {
...(options.additionalEndpoints ?? {}),