Commit Graph

4 Commits

Author SHA1 Message Date
Matt 711e99d8ab KEYCLOAK AUTH FIX: Phase 4b - Additional File Endpoints
**UPDATED ENDPOINTS (3 additional):**
- files/list-with-attachments.ts (CRITICAL: was using old auth)
- files/proxy-preview.ts (SECURITY ISSUE: had NO auth)
- files/proxy-download.ts (SECURITY ISSUE: had NO auth)

**AUTHENTICATION:** All now support dual auth:
- x-tag header (webhooks/external calls)
- Keycloak session (logged-in users)

**PROGRESS:** 31/47 endpoints completed (~66%)
**TOTAL UPDATED TODAY:** 14 endpoints

**READY TO CONTINUE:** Remaining 16 endpoints need updating
2025-06-15 16:34:27 +02:00
Matt c6b4c716a8 updates 2025-06-10 15:21:42 +02:00
Matt 1baa1e3c4d Add logging and improve headers in file proxy preview
- Add console logging for debugging proxy preview requests
- Include filename in Content-Disposition header
- Add Content-Length header for proper response size
- Add X-Content-Type-Options header for PDF security
- Improve buffer handling clarity with explicit ArrayBuffer conversion
2025-06-04 17:32:02 +02:00
Matt 9e9c667d1f Add proxy endpoint to fix CORS issues for file previews
- Create new `/api/files/proxy-preview` endpoint that fetches and serves files directly
- Update FilePreviewModal to use proxy endpoint for images and PDFs
- Set appropriate headers for inline display and caching
- Remove trailing slash from folder display names in file list
2025-06-04 17:19:52 +02:00