Reviewer-run fixes (todo §4); re-mint try/catch degrades an Ory outage to anonymous (not 500), RESERVED_PLUGIN_IDS refuses a plugin folder that would shadow a host route

This commit is contained in:
2026-06-18 11:45:04 +02:00
parent b5af4ba6cd
commit caadaf5da3
7 changed files with 34 additions and 5 deletions

View File

@@ -77,6 +77,13 @@ export function isValidPluginId(id: string): boolean {
return PLUGIN_ID.test(id);
}
// Ids the host reserves for its own first-party mount segments (the auth flows, /auth/complete,
// /logout, the dashboard's /public/ static). Plugin routes resolve before these, so a folder named
// one of them would silently shadow a built-in route — discovery refuses it, loud like any conflict.
export const RESERVED_PLUGIN_IDS: ReadonlySet<string> = new Set([
"auth", "login", "logout", "public", "recovery", "registration", "settings", "verification",
]);
export interface Semver {
major: number;
minor: number;