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:
parent
85e190eaad
commit
019211e341
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user