Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 3.crossOriginEmbedderPolicy.md #261

Merged
merged 2 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Cross-Origin-Embedder-Policy: require-corp
The `crossOriginEmbedderPolicy` header can be configured with following values.

```ts
crossOriginEmbedderPolicy: 'unsafe-none' | 'require-corp' | false;
crossOriginEmbedderPolicy: 'unsafe-none' | 'require-corp' | 'credentialless' | false;
espensgr marked this conversation as resolved.
Show resolved Hide resolved
```

### `unsafe-none`
Expand All @@ -64,6 +64,10 @@ This is the default value. Allows the document to fetch cross-origin resources w

A document can only load resources from the same origin, or resources explicitly marked as loadable from another origin. If a cross origin resource supports CORS, the crossorigin attribute or the Cross-Origin-Resource-Policy header must be used to load it without being blocked by COEP.

### `credentialless`

no-cors cross-origin requests are sent without credentials. In particular, it means Cookies are omitted from the request, and ignored from the response. The responses are allowed **without** an explicit permission via the Cross-Origin-Resource-Policy header. Navigate responses behave similarly as the require-corp mode: They require Cross-Origin-Resource-Policy response header.

::alert{type="warning"}
⚠️ Read more about `Avoiding blockage with CORS` [here](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy#avoiding_coep_blockage_with_cors).
::
2 changes: 1 addition & 1 deletion src/types/headers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export type CrossOriginResourcePolicyValue = 'same-site' | 'same-origin' | 'cros

export type CrossOriginOpenerPolicyValue = 'unsafe-none' | 'same-origin-allow-popups' | 'same-origin';

export type CrossOriginEmbedderPolicyValue = 'unsafe-none' | 'require-corp';
export type CrossOriginEmbedderPolicyValue = 'unsafe-none' | 'require-corp' | 'credentialless';

export type ReferrerPolicyValue =
| 'no-referrer'
Expand Down
Loading