Commit 0de9b99
authored
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.File tree
0 file changed
+0
-0
lines changed0 file changed
+0
-0
lines changed
0 commit comments