aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/helpers/rss.ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-02-15 22:14:03 +0100
committerArmand Philippot <git@armandphilippot.com>2022-02-15 22:25:12 +0100
commit9eae4703c97c50e82d959a3e0859fe1553889b15 (patch)
tree46605bbd1911ef370cc460d6710ad0ff87782e73 /src/utils/helpers/rss.ts
parent4dc0005999c72b78d195bc05193926328030fe78 (diff)
feat: add HTTP security headers
I also renamed and changed the format of some environment variables so I can reuse them inside the CSP security header.
Diffstat (limited to 'src/utils/helpers/rss.ts')
-rw-r--r--src/utils/helpers/rss.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/helpers/rss.ts b/src/utils/helpers/rss.ts
index 8a1c801..e10c7f3 100644
--- a/src/utils/helpers/rss.ts
+++ b/src/utils/helpers/rss.ts
@@ -15,10 +15,10 @@ const getAllPosts = async (): Promise<ArticlePreview[]> => {
};
export const generateFeed = async () => {
- const websiteUrl = process.env.FRONTEND_URL ? process.env.FRONTEND_URL : '';
+ const websiteUrl = `${process.env.NEXT_PUBLIC_APP_PROTOCOL}://${process.env.NEXT_PUBLIC_APP_DOMAIN}`;
const author = {
name: settings.name,
- email: process.env.AUTHOR_EMAIL,
+ email: process.env.APP_AUTHOR_EMAIL,
link: websiteUrl,
};
const copyright = `${settings.name} CC BY SA ${settings.copyright.startYear} - ${settings.copyright.endYear}`;
@@ -27,7 +27,7 @@ export const generateFeed = async () => {
const feed = new Feed({
author,
copyright,
- description: process.env.FEED_DESCRIPTION,
+ description: process.env.APP_FEED_DESCRIPTION,
feedLinks: {
json: `${websiteUrl}/feed/json`,
atom: `${websiteUrl}/feed/atom`,