Release 0.5.0

This commit is contained in:
hnzio committed 2026-10-22 00:28:49 +02:00
1 parent 4042fe6a64
commit 5a9d7735d4
26 files changed
+1855 -113

No files matched your search

+6 -1
View File
@@ -13,11 +13,12 @@ const publicPaths = new Set([
]);
export const handle: Handle = async ({ event, resolve }) => {
const presentationPath = event.url.pathname.startsWith('/heinzlive/');
const token = event.cookies.get(SESSION_COOKIE);
event.locals.user = getSessionUser(token);
if (token && !event.locals.user) deleteSession(event.cookies);
if (!publicPaths.has(event.url.pathname) && !event.locals.user) {
if (!presentationPath && !publicPaths.has(event.url.pathname) && !event.locals.user) {
redirect(303, hasUsers() ? '/login' : '/setup');
}
@@ -25,6 +26,10 @@ export const handle: Handle = async ({ event, resolve }) => {
response.headers.set('Referrer-Policy', 'same-origin');
response.headers.set('X-Content-Type-Options', 'nosniff');
response.headers.set('X-Frame-Options', 'DENY');
if (presentationPath) {
response.headers.set('Cache-Control', 'no-store');
response.headers.set('Referrer-Policy', 'no-referrer');
}
if (event.url.pathname === '/einladung' || event.url.pathname === '/passwort-zuruecksetzen') {
response.headers.set('Cache-Control', 'no-store');
}