Skip to content
uencoder

CORP

CORP (Cross-Origin Resource Policy) lets a resource declare which cross-origin contexts may load it (same-origin/same-site/cross-origin).

Purpose

To provide resource-level cross-origin loading restrictions, preventing cross-origin pages from loading sensitive resources; the companion of COEP.

Mechanism

The resource responds with a Cross-Origin-Resource-Policy: same-origin header, so only same-origin contexts can load it. same-site allows the same site; cross-origin allows any. Defaults to same-origin (without COEP).

Use cases

  • Cross-origin resource protection
  • COEP companion
  • Sensitive resource isolation

Related tools

References