Astro 5.9 adds experimental CSP support and Markdown rendering in content loaders
Web framework Astro 5.9 brings several notable features aimed at developer security and productivity. Foremost, this release introduces experimental Content Security Policy (CSP) support enabled by default. The addition aims to make securing Astro projects against cross-site scripting (XSS) attacks easier, answering the community’s most upvoted feature request to date.
Developers can now use a new renderMarkdown function within the loader context. This function allows Markdown content to be rendered directly inside loaders, utilizing all existing project settings and plugins for Markdown. The approach streamlines workflows for content-driven projects, since it ensures consistency without additional configuration overhead.
In addition, version 5.9 of the web framework allows users to opt out of default responsive image styling by toggling a single flag in the project configuration, and introduces an option for adapters to suppress logs for unsupported features.
