Differentiate between dev and prod for api and nginx

This commit is contained in:
thiloho
2024-08-14 19:33:41 +02:00
parent cf1600671b
commit 0e3fb96dda
18 changed files with 85 additions and 128 deletions

View File

@@ -1,8 +1,9 @@
import { redirect } from "@sveltejs/kit";
import { API_BASE_PREFIX } from "$lib/utils";
export const handle = async ({ event, resolve }) => {
if (!event.url.pathname.startsWith("/api/")) {
const userData = await event.fetch(`/api/account`, {
const userData = await event.fetch(`${API_BASE_PREFIX}/account`, {
method: "GET",
headers: {
"Content-Type": "application/json",