This commit is contained in:
Face 2025-06-27 21:26:12 +03:00
parent 95d6997774
commit 3e9a22e788
6 changed files with 16 additions and 14 deletions

View file

@ -2,11 +2,14 @@ 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'
});
// Only set Cache-Control if not already set
if (!event.request.headers.get('cache-control')) {
event.setHeaders({
'Cache-Control': dev
? 'no-cache'
: 'private, max-age=30'
});
}
// Use the user data already fetched and processed in hooks
return {

View file

@ -1 +0,0 @@
export const ssr = false;

View file

@ -16,5 +16,5 @@ export async function GET(event) {
route: { id: "/api/hopium/questions/[id]" }
};
return await getHopiumQuestion(hopiumEvent);
return await getHopiumQuestion(hopiumEvent as any);
}