Skip to content

Commit

Permalink
fix(cloudflarePages): broken relative url endpoints
Browse files Browse the repository at this point in the history
Fixes #365
  • Loading branch information
harlan-zw committed Sep 27, 2024
1 parent 0aee998 commit 9310f73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runtime/nitro/sitemap/urlset/sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export async function fetchDataSource(input: SitemapSourceBase | SitemapSourceRe

let isHtmlResponse = false
try {
const urls = await globalThis.$fetch(url, {
const fetchContainer = (url.startsWith('/') && event) ? event : globalThis
const urls = await fetchContainer.$fetch(url, {
...options,
responseType: 'json',
signal: timeoutController.signal,
Expand Down

0 comments on commit 9310f73

Please sign in to comment.