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

fix(@astrojs/rss): revert incorrect Content-Type header applied for RSS XML file #12829

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SapphicMoe
Copy link
Contributor

@SapphicMoe SapphicMoe commented Dec 24, 2024

Changes

This fixes an issue where the RSS XML file generated by @astrojs/rss is displayed in plaintext due to a faulty Content-Type header by reverting the #12644 pull request.

For more information, you can view the #12828 issue that I filed.

Example screenshots

Before (current, Content-Type header is set to application/rss+xml; charset=utf-8 since [email protected])

msedge_t86IuPt0Pq

After (manually overriding the Content-Type header to application/xml which was the value used by @astrojs/rss before the PR change)

msedge_pumxsK772k

Testing

A reproducible example can be found here: https://codesandbox.io/p/devbox/kind-hugle-27v5l?on=codesandbox

Or, if you want to reproduce it yourself:

  • Go to https://astro.new and find the Blog template
  • Open the Blog template in CodeSandbox
  • Visit the /rss.xml RSS XML page

You should see the XML page being displayed in plaintext.

Reproducible example screenshot for the "Blog" Template in CodeSandbox

msedge_4MsvTN5VE4

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.

1 participant