invalidate cache to help with CF cache

This commit is contained in:
Face 2025-06-23 20:21:56 +03:00
parent 8c23c68565
commit cd40ede713

View file

@ -172,6 +172,13 @@ export const handle: Handle = async ({ event, resolve }) => {
event.locals.userSession = userData;
if (event.url.pathname.startsWith('/api/')) {
const response = await svelteKitHandler({ event, resolve, auth });
response.headers.set('Cache-Control', 'no-store, no-cache, must-revalidate, private');
return response;
}
return svelteKitHandler({ event, resolve, auth });
};