debug fetching global data error page on ssg

This commit is contained in:
Valentin
2024-04-12 16:14:02 +02:00
parent 05bb7b3cd5
commit d9333f2189
9 changed files with 58 additions and 50 deletions

View File

@@ -8,7 +8,7 @@ import { joinURL } from 'ufo'
export default defineEventHandler(async (event) => {
const proxyUrl = useRuntimeConfig().apiURL
if (event.path.startsWith('/api')) {
if (event.path.startsWith('/api')) {
const path = event.path.replace(/^\/api\//, '')
const target = joinURL(proxyUrl, path)