2024-11-23 02:53:27 +03:00
|
|
|
import { incrementVisitCount, notifyDarkVisitors } from '$lib/visits.js';
|
2024-10-01 02:44:39 +03:00
|
|
|
|
|
|
|
export const csr = true;
|
|
|
|
export const ssr = true;
|
2024-10-01 19:22:15 +03:00
|
|
|
export const prerender = false;
|
2024-10-01 02:44:39 +03:00
|
|
|
export const trailingSlash = 'always';
|
|
|
|
|
2024-10-31 16:07:41 +03:00
|
|
|
export async function load({ request, cookies, url, setHeaders, fetch }) {
|
2024-11-23 02:53:27 +03:00
|
|
|
notifyDarkVisitors(url, request) // no await so it doesnt block load
|
2024-10-31 16:07:41 +03:00
|
|
|
|
|
|
|
setHeaders({ 'Cache-Control': 'no-cache' })
|
|
|
|
|
2024-10-04 03:13:11 +03:00
|
|
|
return {
|
|
|
|
route: url.pathname,
|
2024-11-23 02:53:27 +03:00
|
|
|
visitCount: incrementVisitCount(request, cookies),
|
2024-10-01 02:44:39 +03:00
|
|
|
}
|
2024-10-01 17:24:41 +03:00
|
|
|
}
|