diff --git a/.changeset/young-chairs-check.md b/.changeset/young-chairs-check.md index b0611af148..85d5bbf664 100644 --- a/.changeset/young-chairs-check.md +++ b/.changeset/young-chairs-check.md @@ -2,4 +2,4 @@ '@backstage/core-app-api': patch --- -Apps will now detect when a relative `backend.baseUrl` or `app.baseUrl` is provided and update it to be a full URL. This means that you can provide relative URLs and they will be resolved as expected across the application. +Apps will now rewrite `app.baseUrl` and `backend.baseUrl` to match `location.origin` when `app.baseUrl` is the same as `backend.baseUrl`. This will help reduce the number of front end builds you have to do with a specific config. diff --git a/packages/core-app-api/src/app/AppManager.tsx b/packages/core-app-api/src/app/AppManager.tsx index 5b43a43966..80d836a286 100644 --- a/packages/core-app-api/src/app/AppManager.tsx +++ b/packages/core-app-api/src/app/AppManager.tsx @@ -168,7 +168,7 @@ function useConfigLoader( * We only want to override the URLs with the document origin when the URLs match * and are defined. We use getOptionalString here to not throw when the app.baseUrl * and backend.baseUrl are not defined. If they are defined but not well formatted URLs - * the above resolveRelativeUrl() method will throw. + * the above getRelativeUrl() method will throw. */ if ( configReader.getOptionalString('app.baseUrl') &&