Refactor navigation and game schedule components; remove 'Spielplan' links from Navigation.vue, update links to point to '/mannschaften/spielplaene' in Spielplan.vue, and enhance date and time formatting for improved display. Add PDF metadata and security headers in the API for better document handling.

This commit is contained in:
Torsten Schulz (local)
2025-10-24 01:36:58 +02:00
parent f80a1e5ea9
commit b866ccc215
4 changed files with 153 additions and 85 deletions

View File

@@ -255,6 +255,21 @@ export default defineEventHandler(async (event) => {
\\author{Harheimer TC}
\\date{Saison 2025/26 - Stand: ${currentDate}}
% PDF-Metadaten für Sicherheit
\\usepackage[pdftex]{hyperref}
\\hypersetup{
pdfauthor={Harheimer TC},
pdftitle={Spielplan ${teamName} - Saison 2025/26},
pdfsubject={Vereinsspielplan},
pdfkeywords={Tischtennis, Spielplan, Harheimer TC, ${teamName}},
pdfcreator={Harheimer TC CMS},
pdfproducer={LaTeX mit pdflatex},
pdfcreationdate={${new Date().toISOString()}},
pdfmoddate={${new Date().toISOString()}},
colorlinks=false,
pdfborder={0 0 0}
}
\\begin{document}
\\maketitle
@@ -376,6 +391,14 @@ ${hallenListe.map(halle => {
setHeader(event, 'Content-Disposition', `attachment; filename="spielplan_${team}.pdf"`)
setHeader(event, 'Content-Length', pdfBuffer.length.toString())
// Füge Sicherheits-Header hinzu
setHeader(event, 'X-Content-Type-Options', 'nosniff')
setHeader(event, 'X-Frame-Options', 'DENY')
setHeader(event, 'X-XSS-Protection', '1; mode=block')
setHeader(event, 'Cache-Control', 'no-cache, no-store, must-revalidate')
setHeader(event, 'Pragma', 'no-cache')
setHeader(event, 'Expires', '0')
return pdfBuffer
} catch (compileError) {