create-sitecore-jss 22.6.0-canary.27 → 22.6.0-canary.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,6 +31,12 @@ const sitemapApi = async (
31
31
  const fetcher = new NativeDataFetcher();
32
32
  const xmlResponse = await fetcher.fetch<string>(sitemapPath);
33
33
 
34
+ if (!xmlResponse?.data) {
35
+ return res.redirect('/404');
36
+ }
37
+
38
+ res.setHeader('Content-Type', 'text/xml;charset=utf-8');
39
+
34
40
  return res.send(xmlResponse.data);
35
41
  } catch (error) {
36
42
  return res.redirect('/404');
@@ -61,7 +67,7 @@ const sitemapApi = async (
61
67
  res.setHeader('Content-Type', 'text/xml;charset=utf-8');
62
68
 
63
69
  return res.send(`<?xml version="1.0" encoding="UTF-8"?>
64
- <sitemapindex xmlns="http://sitemaps.org/schemas/sitemap/0.9" encoding="UTF-8">${SitemapLinks}</sitemapindex>
70
+ <sitemapindex xmlns="http://sitemaps.org/schemas/sitemap/0.9">${SitemapLinks}</sitemapindex>
65
71
  `);
66
72
  };
67
73
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-sitecore-jss",
3
- "version": "22.6.0-canary.27",
3
+ "version": "22.6.0-canary.29",
4
4
  "description": "Sitecore JSS initializer",
5
5
  "bin": "./dist/index.js",
6
6
  "scripts": {
@@ -65,5 +65,5 @@
65
65
  "ts-node": "^10.9.1",
66
66
  "typescript": "~5.6.3"
67
67
  },
68
- "gitHead": "f34a7796490441d1063b6d038b72e41cfeebae17"
68
+ "gitHead": "80353b68d104ad9cb5940618e3daee5c98fc1539"
69
69
  }