Skip to content

Commit 622e152

Browse files
committed
fix: correct content type
1 parent 3aff08e commit 622e152

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

apps/next-blog/src/app/rss.xml/route.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,18 @@ export async function GET(req: NextRequest) {
2121
switch (typeAsString) {
2222
case 'rss':
2323
headers['Content-Type'] = 'application/rss+xml'
24+
break
2425
case 'atom':
2526
headers['Content-Type'] = 'application/atom+xml'
27+
break
2628
case 'json':
2729
headers['Content-Type'] = 'application/json'
30+
break
2831
}
2932

3033
headers['Cache-Control'] = 'max-age=0, s-maxage=3600'
3134

35+
console.log('ttttt', typeAsString)
3236
return new Response(rss, { headers })
3337
} catch (e: unknown) {
3438
console.error(e)

apps/next-blog/src/utils/generateRSSFeed.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ export async function generateRssFeed(type: 'rss' | 'atom' | 'json' = 'rss') {
99
updated: new Date(),
1010
language: 'en',
1111
author: {
12-
name: 'Blog of Center of Trial & Error',
12+
name: 'Blog of Center of Trial and Error',
1313
email: 'info@trialanderror.org',
1414
link: 'https://blog.trialanderror.org',
1515
},
1616
ttl: 60 * 60,
17-
title: 'Blog of Center of Trial & Error | RSS Feed',
18-
description: 'Updates from the Blog of Trial & Error!',
17+
title: 'Blog of Center of Trial and Error | RSS Feed',
18+
description: 'Updates from the Blog of Trial and Error!',
1919
id: site_url,
2020
link: site_url,
2121
image: `${site_url}/android-chrome-384x384.png`,
2222
favicon: `${site_url}/favicon.ico`,
23-
copyright: `CC-BY 4.0 ${new Date().getFullYear()}, Center of Trial & Error`,
23+
copyright: `CC-BY 4.0 ${new Date().getFullYear()}, Center of Trial and Error`,
2424
generator: 'Feed for Node.js',
2525
feedLinks: {
2626
rss2: `/rss.xml`,

0 commit comments

Comments
 (0)