Aperçu : route /api/preview en lecture seule et visualiseurs côté client

- GET /api/preview?path= et /api/public/{jeton}/preview : liste blanche d'extensions, inline, nosniff, CSP stricte, texte plafonné à 2 Mo
- Visualiseurs : texte brut, CSV paginé (PapaParse), Markdown sans HTML brut (react-markdown + remark-gfm), code colorisé (highlight.js), PDF natif
- Le HTML s'affiche comme du code, jamais rendu ; RTF/DOC/DOCX hors périmètre

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cedricandClaude Opus 5.5 committed 2026-11-20 12:02:19 +01:00
1 parent fe81055421
commit d4da3db132
14 files changed
+2378 -39

No files matched your search

+6 -1
View File
@@ -9,10 +9,15 @@
"preview": "vite preview"
},
"dependencies": {
"highlight.js": "^11.11.1",
"papaparse": "^5.5.3",
"react": "^19.1.0",
"react-dom": "^19.1.0"
"react-dom": "^19.1.0",
"react-markdown": "^10.1.0",
"remark-gfm": "^4.0.1"
},
"devDependencies": {
"@types/papaparse": "^5.5.2",
"@types/react": "^19.1.0",
"@types/react-dom": "^19.1.0",
"@vitejs/plugin-react": "^5.0.0",