<?php
// Direct output of dynamic sitemap for SEO-friendly URL
header('Content-Type: application/xml; charset=utf-8');
header('Cache-Control: public, max-age=3600');

// Include ThinkPHP framework
require __DIR__ . '/../vendor/autoload.php';

// Bootstrap application
$app = new think\App();
$http = $app->http;

// Create internal request to sitemap API
$request = \think\facade\Request::create('/api/sitemap', 'GET');
$response = $http->run($request);

// Output the XML content
echo $response->getContent();
exit;
