feat(frontend): add management portal landing page

This commit is contained in:
david
2026-07-31 15:00:44 +08:00
parent ad6a914450
commit 486fcc94e9
16 changed files with 2536 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
export default {
async fetch(request, env) {
const response = await env.ASSETS.fetch(request);
const acceptsHtml = request.headers.get("accept")?.includes("text/html");
if (response.status !== 404 || !acceptsHtml || !["GET", "HEAD"].includes(request.method)) {
return response;
}
const indexUrl = new URL(request.url);
indexUrl.pathname = "/index.html";
indexUrl.search = "";
return env.ASSETS.fetch(new Request(indexUrl, request));
},
};