1
0
mirror of https://github.com/aureliendavid/rsspreview.git synced 2025-08-22 19:28:39 +00:00

handle content-type x-rss+xml as feed (#64)

This commit is contained in:
Aurelien David 2023-05-27 13:48:08 +02:00
parent 85e190eaad
commit 019211e341

View File

@ -9,9 +9,9 @@ function detectFeed(event) {
for (let header of event.responseHeaders) { for (let header of event.responseHeaders) {
if (header.name.toLowerCase() == 'content-type') { if (header.name.toLowerCase() == 'content-type') {
if (header.value.match(/application\/(rss|atom)\+xml/)) { if (header.value.match(/application\/((x-)?rss|atom)\+xml/)) {
header.value = header.value.replace( header.value = header.value.replace(
/application\/(rss|atom)\+xml/, /application\/((x-)?rss|atom)\+xml/,
'text/xml' 'text/xml'
); );
isfeed = true; isfeed = true;