Initial commit: Kalendartool (Next.js, Prisma, Docker)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
25
app/api/manifest/route.ts
Normal file
25
app/api/manifest/route.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* GET /api/manifest - Modul-Contract des Kalendertools (module-plan.md Abschnitt 1).
|
||||
*
|
||||
* Urspruenglich unter /.well-known/app-manifest geplant, aber Next.js App Router
|
||||
* routed keine Ordner mit fuehrendem Punkt (.well-known). Die Route liegt deshalb
|
||||
* unter /api/manifest und wird per next.config.rewrites nach /.well-known/app-manifest
|
||||
* gemappt (mit basePath: false, damit sie auch im Proxy-Modus ohne Praefix erreichbar ist).
|
||||
*/
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET() {
|
||||
const basePath = (process.env.HUB_BASE_PATH ?? "").replace(/\/$/, "");
|
||||
|
||||
return NextResponse.json(
|
||||
{
|
||||
name: "Kalendertool",
|
||||
slug: "kalender",
|
||||
version: "1.0",
|
||||
icon: "/icon.png",
|
||||
auth: { mode: "hub-token", path: "/auth/hub" },
|
||||
basePath: basePath || "/apps/kalender",
|
||||
},
|
||||
{ headers: { "Cache-Control": "public, max-age=60" } }
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user