Skip to content

Commit

Permalink
Prefetch allowlist / delegations in production
Browse files Browse the repository at this point in the history
  • Loading branch information
TimDaub committed Feb 3, 2025
1 parent 5091576 commit 1c9351b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/views/components/head.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ export function custom(
twitterCard = "summary_large_image",
prefetch = [],
) {
if (process.env.NODE_ENV === "production") {
prefetch = [
...prefetch,
"https://news.kiwistand.com:8443/api/v1/allowlist?cached=true",
"https://news.kiwistand.com:8443/api/v1/delegations?cached=true",
];
}
ogImage = DOMPurify.sanitize(ogImage);
ogTitle = DOMPurify.sanitize(ogTitle);
ogDescription = DOMPurify.sanitize(ogDescription);
Expand Down

0 comments on commit 1c9351b

Please sign in to comment.