fix mime type
Some checks are pending
Build / Build (push) Waiting to run

This commit is contained in:
Fabrice LAMANT
2026-02-16 10:46:31 +01:00
parent 27c2c871d7
commit 839bb31316

View File

@ -16,7 +16,7 @@ export async function GET(
const content = await fs.readFile(filePath, "utf-8");
if (!content) throw new Error()
return new NextResponse(content, { status: 200, headers: { "Content-Type": "text/calendar" } });
return new NextResponse(content, { status: 200, headers: { "Content-Type": slug?.join("/").endsWith(".ics") ? "text/calendar" : "text/json" } });
} catch (ex) {
console.log(ex);
return new NextResponse("File not found", { status: 404 });