fix: serve manifest via API route to bypass nginx 403 on static files
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 1m32s

This commit is contained in:
Antigravity
2026-05-09 20:08:57 +00:00
parent f044377e7a
commit 4730ab6117
3 changed files with 36 additions and 28 deletions

View File

@@ -0,0 +1,35 @@
import { NextResponse } from "next/server";
export async function GET() {
return NextResponse.json(
{
name: "Memento Notes",
short_name: "Memento",
description: "A smart, local-first note taking app with AI capabilities.",
start_url: "/",
display: "standalone",
background_color: "#F2F0E9",
theme_color: "#1C1C1C",
icons: [
{
src: "/icons/icon-192.svg",
sizes: "192x192",
type: "image/svg+xml",
purpose: "any maskable",
},
{
src: "/icons/icon-512.svg",
sizes: "512x512",
type: "image/svg+xml",
purpose: "any maskable",
},
],
},
{
headers: {
"Content-Type": "application/manifest+json",
"Cache-Control": "public, max-age=86400",
},
}
);
}

View File

@@ -39,7 +39,7 @@ const jetbrainsMono = JetBrains_Mono({
export const metadata: Metadata = {
title: "Memento - Your Digital Notepad",
description: "A beautiful note-taking app built with Next.js 16",
manifest: "/manifest.webmanifest",
manifest: "/api/manifest",
icons: {
icon: "/icons/icon-512.svg",
apple: "/icons/icon-512.svg",

View File

@@ -1,27 +0,0 @@
import type { MetadataRoute } from "next";
export default function manifest(): MetadataRoute.Manifest {
return {
name: "Memento Notes",
short_name: "Memento",
description: "A smart, local-first note taking app with AI capabilities.",
start_url: "/",
display: "standalone",
background_color: "#F2F0E9",
theme_color: "#1C1C1C",
icons: [
{
src: "/icons/icon-192.svg",
sizes: "192x192",
type: "image/svg+xml",
purpose: "any maskable",
},
{
src: "/icons/icon-512.svg",
sizes: "512x512",
type: "image/svg+xml",
purpose: "any maskable",
},
],
};
}