Add config to disable experimental public entry point

Signed-off-by: benjdlambert <ben@blam.sh>
This commit is contained in:
benjdlambert
2026-05-26 10:33:37 +02:00
parent acf1945a83
commit ca450bec54
3 changed files with 20 additions and 1 deletions
@@ -0,0 +1,5 @@
---
'@backstage/plugin-app-backend': patch
---
Added a new `app.disableExperimentalPublicEntryPoint` config option that allows you to opt out of the automatic public sign-in entry point. When set to `true`, the app backend will skip serving the public entry point to unauthenticated users, even if the app was bundled with an `index-public-experimental` entry point.
+9
View File
@@ -42,5 +42,14 @@ export interface Config {
* If you disable this, it is recommended to set a `staticFallbackHandler` instead.
*/
disableStaticFallbackCache?: boolean;
/**
* Disables the experimental public entry point used for unauthenticated
* sign-in pages. When the app is bundled with an
* `index-public-experimental` entry point, the app backend will
* automatically serve it to unauthenticated users. Set this to `true` to
* skip that behavior and always serve the main entry point instead.
*/
disableExperimentalPublicEntryPoint?: boolean;
};
}
+6 -1
View File
@@ -153,7 +153,12 @@ export async function createRouter(
const publicDistDir = resolvePath(appDistDir, 'public');
const enablePublicEntryPoint = await fs.pathExists(publicDistDir);
const disableExperimentalPublicEntryPoint = config.getOptionalBoolean(
'app.disableExperimentalPublicEntryPoint',
);
const enablePublicEntryPoint =
!disableExperimentalPublicEntryPoint &&
(await fs.pathExists(publicDistDir));
if (enablePublicEntryPoint) {
logger.info(