Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -1,8 +1,11 @@
|
||||
import { LoaderFunctionArgs } from "react-router";
|
||||
import { LoaderFunctionArgs, useLoaderData } from "react-router";
|
||||
import Page404 from "~/components/pages/Page404";
|
||||
import ServerError from "~/components/ui/errors/ServerError";
|
||||
import { getHostRoutingContextFromRequest } from "~/utils/app/HostRouting.server";
|
||||
import { oauthAuthorizationServerMetadata } from "~/services/mcp/oauth.server";
|
||||
|
||||
type LoaderData = { surface: "admin" | "public" };
|
||||
|
||||
export const loader = async ({ request }: LoaderFunctionArgs) => {
|
||||
const url = new URL(request.url);
|
||||
if (url.pathname === "/.well-known/oauth-authorization-server") {
|
||||
@@ -12,10 +15,19 @@ export const loader = async ({ request }: LoaderFunctionArgs) => {
|
||||
},
|
||||
});
|
||||
}
|
||||
return Response.json({}, { status: 404 });
|
||||
// An unknown path on the admin host used to render the marketing 404, complete
|
||||
// with "Anmelden"/"Registrieren"/AGB footer links, while an unknown path that
|
||||
// *did* match an admin route rendered the operator 404. Same host, two very
|
||||
// different pages (admin audit 2026-07-26, P0-12).
|
||||
const surface: LoaderData["surface"] = getHostRoutingContextFromRequest(request) === "admin" ? "admin" : "public";
|
||||
return Response.json({ surface } satisfies LoaderData, { status: 404 });
|
||||
};
|
||||
|
||||
export default function () {
|
||||
const { surface } = useLoaderData<LoaderData>();
|
||||
if (surface === "admin") {
|
||||
return <Page404 withLogo={false} withFooter={false} withGoBack={false} />;
|
||||
}
|
||||
return <Page404 />;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user