MEGAINFRA-WEBAPP/src
DEls 8317238184 fix(purchasing): proxy PB files so PDFs render in the slip iframe
PocketBase sets `Content-Security-Policy: ...sandbox` on /api/files,
which makes Chromium treat the response as opaque-origin and silently
fail to render PDFs inside an <iframe> (downloads still work). Add a
same-origin proxy at /api/pb-files that forwards the bytes and strips
the CSP / X-Frame-Options headers so the iframe can render.

Files:
- new: src/app/api/pb-files/[collection]/[recordId]/[...filename]/route.ts
- SlipPreview now uses /api/pb-files/... for PDFs and PB directly
  for images (<img> isn't subject to the CSP sandbox, so the direct
  URL works there unchanged).

Path validation, ALLOWED_COLLECTIONS gate, path-traversal guard, and a
stable Content-Disposition so downloads keep the original filename.
2026-09-07 14:53:22 +02:00
..
app fix(purchasing): proxy PB files so PDFs render in the slip iframe 2026-09-07 14:53:22 +02:00
components fix(purchasing): proxy PB files so PDFs render in the slip iframe 2026-09-07 14:53:22 +02:00
hooks Initial commit: MEGA INFRASTRUCTURE dashboard + Coolify Dockerfile 2026-08-09 01:37:40 +02:00
lib feat(delivery-notes): dedup by SHA-256 at upload time 2026-09-07 14:49:33 +02:00
mcp feat(mcp): read-only stdio MCP server exposing six tools 2026-08-29 20:25:39 +02:00