Skip to content

Directive: font src

Ryan Parman edited this page Jun 14, 2024 · 7 revisions

Overview

The font-src directive specifies valid sources for fonts loaded using @font-face.

Affects: @font-face

Required reading:

Usage examples

Accepts one or more schemes or hosts, the 'self' keyword, or the 'none' keyword.

font-src 'none'
font-src 'self'
font-src example.com
font-src example.com example.org
font-src https://fonts.google.com
font-src https:

Fallbacks

font-src will fallback to default-src if it is undefined.

Possible errors

  • CSP-0100 — [ERROR] directive %s has an invalid value %s

For developers

ABNF (CSP3)

directive-name  = "font-src"
directive-value = serialized-source-list

See ABNF: serialized-source-list

Type

References

Clone this wiki locally