Skip to content

Commit 0de9b99

Browse files
Rollup merge of #144467 - hydro-project:users/mingwes/rustdoc-fix-cors, r=GuillaumeGomez
rustdoc template font links only emit `crossorigin` when needed The `crossorigin` attribute may cause issues when the href is not actually cross-origin. Specifically, the tag causes the browser to send a preflight OPTIONS request to the server even if it is same-origin. Some temperamental servers may reject all CORS preflight 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 appears to be relative to the same origin.
2 parents 14b7b0b + d39f347 commit 0de9b99

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)