Skip to content

Local rustdocs generate cross-origin errors trying to load fonts in Firefox #34681

Closed
@luser

Description

@luser

Loading the locally installed copy of the standard library docs in Firefox I see errors in the console about loading fonts:

downloadable font: download failed (font-family: "Source Serif Pro" style:normal weight:normal stretch:normal src index:1): bad URI or cross-site access not allowed source: file:///C:/Users/Ted%20Mielczarek/.multirust/toolchains/stable-x86_64-pc-windows-msvc/share/doc/rust/html/SourceSerifPro-Regular.woff

This is because Firefox implements a strict same-origin policy for file: URLs: https://developer.mozilla.org/en-US/docs/Same-origin_policy_for_file:_URIs

...and web fonts follow the same-origin policy, so a html page loaded from a file: URL can't load a web font from a parent directory.

/cc @Ms2ger

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-enhancementCategory: An issue proposing an enhancement or a PR with one.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions