fix: update environment variables in Dockerfile and use config for host in sitemap generation
This commit is contained in:
@@ -3,8 +3,7 @@
|
||||
// app/(api)/sitemap/route.ts
|
||||
import { NextResponse } from 'next/server';
|
||||
import { productCategoriesData } from '../product_categories/data';
|
||||
|
||||
const HOST = 'http://localhost:3000';
|
||||
import { host } from '@/config';
|
||||
|
||||
const pages = [
|
||||
'/',
|
||||
@@ -30,7 +29,7 @@ export async function GET() {
|
||||
const loc = `/${locale}`;
|
||||
return `
|
||||
<url>
|
||||
<loc>${HOST}${loc}${page}</loc>
|
||||
<loc>${host}${loc}${page}</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>0.8</priority>
|
||||
</url>
|
||||
|
||||
Reference in New Issue
Block a user