Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set correct content type of sitemap.xml #184

Merged
merged 1 commit into from Jan 17, 2022
Merged

Set correct content type of sitemap.xml #184

merged 1 commit into from Jan 17, 2022

Conversation

stefankempf
Copy link
Contributor

As explained in https://stackoverflow.com/questions/3272534/what-content-type-value-should-i-send-for-my-xml-sitemap

*Always target the /dev/ folder when proposing changes. *

Fixes # .

Changes proposed in this pull request:

@robdekort robdekort merged commit 82cfd30 into studio1902:main Jan 17, 2022
@robdekort
Copy link
Contributor

Thank you!

@sjclark
Copy link
Contributor

sjclark commented Jan 17, 2022

Huh curious, I've always just used xml which Statamic by default automatically aliases to text/xml but from what I've just read up on application/xml is definitely a better choice. Wonder why it defaults to the other?

Edit: ironically just realised the article referenced above is one of the ones i read 😂

@robdekort
Copy link
Contributor

I don't know either. I removed the content type - it was initially there - when Statamic added the XML template support, but Stefan found this still caused issues. At least on his server config. So it's back now :-)

@stefankempf
Copy link
Contributor Author

Wonder why it defaults to the other?

I tried to find out myself but didn't found any answer. As stated in the article, sitemaps.org doesn't mention the content-type at all, so it was kind of a best guess from my side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants