Skip to content

Astro hybrid output response headers #8739

Closed Answered by delucis
friedemannsommer asked this question in Q&A
Discussion options

You must be logged in to vote

This is expected for prerendered routes. For anything that is pre-rendered Astro behaves essentially as a static site generator: it creates static HTML, CSS, etc. Deciding on MIME type headers etc. should then be done by whatever server ends up serving these static files. Usually this is done using a file extension — for example if you rename your example file to src/pages/prerender.txt.ts, it will generate a prerender.txt file and running npm run preview will show the correct Content-Type header.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@friedemannsommer
Comment options

Answer selected by friedemannsommer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants