mirror of
https://github.com/makew0rld/amfora.git
synced 2025-01-03 14:56:27 -05:00
🐛 Detect feed for any XML file
This commit is contained in:
parent
2043ed7212
commit
8672b78d69
@ -115,7 +115,7 @@ func GetFeed(mediatype, filename string, r io.Reader) (*gofeed.Feed, bool) {
|
||||
// Check mediatype and filename
|
||||
if mediatype != "application/atom+xml" && mediatype != "application/rss+xml" && mediatype != "application/json+feed" &&
|
||||
filename != "atom.xml" && filename != "feed.xml" && filename != "feed.json" &&
|
||||
!strings.HasSuffix(filename, ".atom") && !strings.HasSuffix(filename, ".rss") {
|
||||
!strings.HasSuffix(filename, ".atom") && !strings.HasSuffix(filename, ".rss") && !strings.HasSuffix(filename, ".xml") {
|
||||
// No part of the above is true
|
||||
return nil, false
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user