my_gradio / js /app /src /routes /+layout.server.ts
xray918's picture
Upload folder using huggingface_hub
0ad74ed verified
raw
history blame contribute delete
327 Bytes
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, "/");
}
}