files/en-us/web/http/reference/headers/content-security-policy/object-src/index.md
The HTTP {{HTTPHeader("Content-Security-Policy")}}
object-src directive specifies valid sources for the
{{HTMLElement("object")}} and {{HTMLElement("embed")}} elements.
<table class="properties"> <tbody> <tr> <th scope="row">CSP version</th> <td>1</td> </tr> <tr> <th scope="row">Directive type</th> <td>{{Glossary("Fetch directive")}}</td> </tr> <tr> <th scope="row">{{CSP("default-src")}} fallback</th> <td> Yes. If this directive is absent, the user agent will look for the <code>default-src</code> directive. </td> </tr> </tbody> </table>[!NOTE] Elements controlled by
object-srcare perhaps coincidentally considered legacy HTML elements and aren't receiving new standardized features (such as the security attributessandboxorallowfor<iframe>). Therefore it is recommended to restrict this fetch-directive (e.g., explicitly setobject-src 'none'if possible).
Content-Security-Policy: object-src 'none';
Content-Security-Policy: object-src <source-expression-list>;
This directive may have one of the following values:
'none'
<source-expression-list>
Given this CSP header:
Content-Security-Policy: object-src https://example.com/
The following {{HTMLElement("object")}} and {{HTMLElement("embed")}} elements are blocked and won't load:
<embed src="https://not-example.com/flash" />
<object data="https://not-example.com/plugin"></object>
{{Specifications}}
{{Compat}}