Closed irensaltali closed 3 years ago
Hi @irensaltali
Do you have any links or screenshots for content type requirement? If it's required we should simply set it so without Produces attribute.
I couldn't again on Google but https://www.xml-sitemaps.com/validate-xml-sitemap.html gives error on "text/xml". I think Google is resolving it either way. I wrote it wrong.
I think Produce attribute is still better way of doing that.
Hi İren
I pushed the content type changes to master already. There is a new NuGet package and it should be published soon. Thank a lot for the PR. Have a great day.
XmlResult.cs always returning "Content-Type" as "text/xml". But Google requires sitemaps as "application/xml". Besides, there is a Produce attribute on .NET MVC but XmlResult.cs overwrites it. So I made a change to read Produce attribute and change "Content-Type" header based on that.