File size: 327 Bytes
0ad74ed
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { redirect } from "@sveltejs/kit";
import { dev } from "$app/environment";

export function load({ url }): void {
	const { pathname, search } = url;

	if (dev && url.pathname.startsWith("/theme")) {
		redirect(308, `http://127.0.0.1:7860${pathname}${search}`);
	}
	if (url.pathname !== "/") {
		redirect(308, "/");
	}
}