CSP fetch directives are used in a Content-Security-Policy header and control locations from which certain resource types may be loaded. For instance, script-src allows developers to allow trusted sources of script to execute on a page, while font-src controls the sources of web fonts.
All fetch directives fall back to default-src. That means, if a fetch directive is absent in the CSP header, the user agent will look for the default-src directive.
These CSP directives are fetch directives:
- child-src
- connect-src
- default-src
- font-src
- frame-src
- img-src
- manifest-src
- media-src
- object-src
- script-src
- style-src
- worker-src
Learn more
- Content-Security-Policy
- Other kinds of directives: