feat(website): add charset header, integrity attributes, and disable directory indexing#10176
feat(website): add charset header, integrity attributes, and disable directory indexing#10176
Conversation
…directory indexing - Create Astro middleware to set Content-Type charset=utf-8 for all HTML responses - Add integrity attribute (SHA-384) to 1ds-init.js script in base-layout and Starlight config - Add crossorigin="anonymous" to external wcp-consent.js script - Disable directory indexing for /docs/handbook/configuration/configuration/ via meta robots tag and middleware X-Robots-Tag header Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/7dfd7541-76dc-4f3c-9397-bdedcfaca7a0 Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/7dfd7541-76dc-4f3c-9397-bdedcfaca7a0 Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
|
/azp run typespec - PR Tools |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
No changes needing a change description found. |
|
You can try these changes here
|
|
@copilot this is not emitting charset with the content-type in http response headers. Please see if you can determine why and fix. Once fixed, make sure to merge with the latest from main and verify that all files are correctly formatted |
The charset is communicated through Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
…esponses Extends the Astro middleware to set charset=utf-8 on all text-based content types (text/*, XML, JSON, JavaScript, shell scripts), not just text/html. Binary types like video/mp4 are correctly excluded. Fixes missing charset on /img/favicon.svg, /install.sh, /sitemap-index.xml, and /playground. Agent-Logs-Url: https://github.com/microsoft/typespec/sessions/51f75269-4872-4fa8-9506-d7177bd4b470 Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
|
/azp run typespec - PR Tools |
|
Azure Pipelines successfully started running 1 pipeline(s). |
website/src/middleware.tsto addcharset=utf-8for all text-based content types (SVG, XML, shell scripts, etc.) — not just HTMLCoverage per requested URL:
/img/favicon.svgimage/svg+xml+xml)/install.shapplication/x-sh/x-sh)/sitemap-index.xmlapplication/xml/xml)/playgroundtext/htmltext/)/img/illustrations/refactor.mp4video/mp4⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.