/** * 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" } } ); }