plume/cross_origin_resource_policy
Cross-Origin Resource Policy (CORP)
This response header determines which origins are allowed to
read no-cors resource responses (e.g. those triggered by <script> and <img>).
See the MDN docs.
Types
A Cross-Origin-Resource-Policy header value.
pub type CrossOriginResourcePolicy {
SameSite
SameOrigin
CrossOrigin
}
Constructors
-
SameSiteRestricts reads to requests from the same site (matched by registrable domain). Less secure than
SameOrigin. -
SameOriginRestricts reads to requests sharing the same origin (same scheme, host, and port). Plume default.
-
CrossOriginPermits reads from any origin. Useful when paired with
Cross-Origin-Embedder-Policy.
Values
pub fn to_string(value: CrossOriginResourcePolicy) -> String
Encode as the Cross-Origin-Resource-Policy header value.