about summary refs log tree commit diff
path: root/src/librustdoc/html/layout
AgeCommit message (Collapse)AuthorLines
2025-08-01rustdoc font links only emit `crossorigin` when neededMingwei Samuel-0/+24
The `crossorigin` attribute may cause issues when the href is not actuall across origins. Specifically, the tag causes the browser to send a preflight OPTIONS request to the href even if it is same-origin. Some tempermental servers may reject all CORS preflect requests even if they're actually same-origin, which causes a CORS error and prevents the fonts from loading, even later on. This commit fixes that problem by not emitting `crossorigin` if the url looks like a domain-relative url. Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>