You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments