This repository has been archived on 2025-08-19. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
coinstorge/website/src/routes/+layout.server.ts

16 lines
436 B
TypeScript
Raw Normal View History

2025-05-22 13:17:11 +03:00
import type { LayoutServerLoad } from './$types';
import { dev } from '$app/environment';
export const load: LayoutServerLoad = async (event) => {
event.setHeaders({
'Cache-Control': dev
? 'no-cache'
: 'private, max-age=30'
});
2025-05-31 19:29:20 +03:00
// Use the user data already fetched and processed in hooks
2025-05-22 13:17:11 +03:00
return {
2025-05-31 19:29:20 +03:00
userSession: event.locals.userSession,
2025-05-22 13:17:11 +03:00
url: event.url.pathname,
};
};