Currently your plugin detects XML-iness and not RSS-iness, so maybe you deliberately wanted to keep the MIME type broad. However I think it makes sense to be a bit more specific to ensure compatibility. It probably also makes sense to make the MIME type configurable instead of magically auto-detecting it from the snippet's output. Explicit configuration will have a better performance, be more flexible and also more robust. :)
PS: You don't need to send the Content-Type header from the snippets as you return a Response object from the page method. That will override the value from the snippet anyway.
The MIME type for RSS feeds is
application/rss+xml
, which would need to be changed here:https://github.com/bnomei/kirby3-feed/blob/e9a3d4be85e16d0aa5d54742dbc4be9d86051d37/config.php#L21
Currently your plugin detects XML-iness and not RSS-iness, so maybe you deliberately wanted to keep the MIME type broad. However I think it makes sense to be a bit more specific to ensure compatibility. It probably also makes sense to make the MIME type configurable instead of magically auto-detecting it from the snippet's output. Explicit configuration will have a better performance, be more flexible and also more robust. :)
PS: You don't need to send the
Content-Type
header from the snippets as you return aResponse
object from the page method. That will override the value from the snippet anyway.