Cross-Origin-Resource-Policy

Estás leyendo la versión en inglés del artículo porque aún no existe una traducción para este idioma. ¡Ayúdanos a traducir este artículo!

Note: Due to a bug in Chrome, setting Cross-Origin-Resource-Policy can break file downloads, preventing visitors using Save as or Save image as on resources with the CORP header. Exercise caution when deciding to use this feature in a production environment.

The HTTP Cross-Origin-Resource-Policy response header conveys a desire that the browser blocks no-cors cross-origin/cross-site requests to the given resource.

Header type Response header
Forbidden header name no

Syntax

Cross-Origin-Resource-Policy: same-site | same-origin | cross-site  

Examples

The response header below will cause compatible user agents to disallow cross-origin no-cors requests:

Cross-Origin-Resource-Policy: same-origin

Specifications

Specification Status Comment
Fetch Living Standard Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Cross-Origin-Resource-PolicyChrome Full support 73
Notes
Full support 73
Notes
Notes Until version 75, downloads for files with this header would fail in Chrome. See bug 952834.
Edge No support NoFirefox Full support 69
Disabled
Full support 69
Disabled
Disabled From version 69: this feature is behind the browser.tabs.remote.useCORP preference (needs to be set to true). To change preferences in Firefox, visit about:config.
IE No support NoOpera No support NoSafari Full support 12WebView Android Full support 73
Notes
Full support 73
Notes
Notes Until version 75, downloads for files with this header would fail in WebView. See bug 952834.
Chrome Android Full support 73
Notes
Full support 73
Notes
Notes Until version 75, downloads for files with this header would fail in Chrome. See bug 952834.
Firefox Android No support NoOpera Android No support NoSafari iOS Full support 12Samsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
See implementation notes.
See implementation notes.
User must explicitly enable this feature.
User must explicitly enable this feature.

See also