🐛 Fix rss feed charset issue
This commit is contained in:
parent
8e28781cbc
commit
3615c170f6
@ -68,11 +68,13 @@ export default defineEventHandler(async (event) => {
|
|||||||
|
|
||||||
switch (queries.type) {
|
switch (queries.type) {
|
||||||
case "json":
|
case "json":
|
||||||
|
setResponseHeader(event, "Content-Type", "application/json; charset=utf-8")
|
||||||
return feed.json1()
|
return feed.json1()
|
||||||
case "rss":
|
case "rss":
|
||||||
setResponseHeader(event, "Content-Type", "application/rss+xml; charset=utf-8")
|
setResponseHeader(event, "Content-Type", "application/rss+xml; charset=utf-8")
|
||||||
return feed.rss2()
|
return feed.rss2()
|
||||||
default:
|
default:
|
||||||
|
setResponseHeader(event, "Content-Type", "application/rss+xml; charset=utf-8")
|
||||||
return feed.atom1()
|
return feed.atom1()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user