@fullstackdatasolutions/articles 1.3.0 → 1.3.1

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.
package/dist/server.js CHANGED
@@ -1052,11 +1052,13 @@ function getArticleMarkdownResponse(slug, config, options) {
1052
1052
  const article = yield getArticleMetadata(slug, config);
1053
1053
  reportAiCrawl(slug, config, options == null ? void 0 : options.headers);
1054
1054
  const body = article && config.markdownTwinHeader !== false ? `${buildMarkdownTwinHeader(article, config, markdown)}${markdown.trimStart()}` : markdown;
1055
+ const canonicalUrl = `${config.siteUrl.replace(/\/$/, "")}/articles/${slug}`;
1055
1056
  return new Response(body, {
1056
- headers: __spreadValues({
1057
+ headers: {
1057
1058
  "Content-Type": "text/markdown; charset=utf-8",
1058
- "Cache-Control": "public, max-age=3600, s-maxage=3600"
1059
- }, article ? getArticleAiHeaders(article, config) : {})
1059
+ "Cache-Control": "public, max-age=3600, s-maxage=3600",
1060
+ Link: `<${canonicalUrl}>; rel="canonical"`
1061
+ }
1060
1062
  });
1061
1063
  });
1062
1064
  }