Migrate CSP middleware to Next.js proxy convention.

Renames src/middleware.ts to src/proxy.ts per Next.js 16 deprecation guidance. CSP nonce behavior is unchanged; build no longer emits the middleware warning.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
BigBodyCobain
2026-06-29 22:40:21 -06:00
parent 39ca498d88
commit 47faa1e488
7 changed files with 24 additions and 24 deletions
+1 -1
View File
@@ -75,7 +75,7 @@ The release build now does the full packaging pipeline:
1. Generates branded icons in `src-tauri/icons/`
2. Stages a desktop-only frontend export tree that omits Next server-only
routes/middleware (`src/app/api`, `src/middleware.ts`)
routes/proxy (`src/app/api`, `src/proxy.ts`)
3. Stages a managed backend runtime bundle from `backend/` into
`src-tauri/backend-runtime/`
4. Builds the frontend export with `NEXT_OUTPUT=export`
+1 -1
View File
@@ -52,7 +52,7 @@ See [RELEASE_INPUTS.md](./RELEASE_INPUTS.md) for the plain-language answer to
1. Generates the desktop icon set in `src-tauri/icons/`
2. Stages a desktop-only frontend export tree that omits Next server-only
routes/middleware (`src/app/api`, `src/middleware.ts`)
routes/proxy (`src/app/api`, `src/proxy.ts`)
3. Stages a managed backend runtime bundle into `src-tauri/backend-runtime/`
4. Builds the frontend export with `NEXT_OUTPUT=export`
5. Copies `frontend/out` into `src-tauri/companion-www/`
@@ -17,7 +17,7 @@ const excludedPaths = [
'.next',
'out',
'src/app/api',
'src/middleware.ts',
'src/proxy.ts',
];
function normalizeRelativePath(target) {