Use absolute URLs in sitemap.xml (#316)

This commit is contained in:
Samy Pessé
2024-03-20 22:58:57 +00:00
committed by GitHub
parent 31799038dd
commit 1dc81fc56a
+3 -2
View File
@@ -3,7 +3,8 @@ import jsontoxml from 'jsontoxml';
import { NextRequest } from 'next/server';
import { getSpaceContentData } from '@/lib/api';
import { pageHref } from '@/lib/links';
import { absoluteHref } from '@/lib/links';
import { getPagePath } from '@/lib/pages';
import { getContentPointer } from '../../fetch';
@@ -25,7 +26,7 @@ export async function GET(req: NextRequest) {
return {
url: {
loc: pageHref(rootPages, page),
loc: absoluteHref(getPagePath(rootPages, page), true),
priority: normalizedPriority,
...(lastModified
? {