You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implements support for three Cross-Origin HTTP security headers:
- Cross-Origin-Resource-Policy (CORP) via security_headers_corp
Default: same-site (safe opt-out default)
Values: same-site, same-origin, cross-origin, omit
- Cross-Origin-Opener-Policy (COOP) via security_headers_coop
Default: omit (opt-in to avoid breaking sites)
Values: same-origin, same-origin-allow-popups, unsafe-none, omit
- Cross-Origin-Embedder-Policy (COEP) via security_headers_coep
Default: omit (opt-in to avoid breaking sites)
Values: require-corp, credentialless, unsafe-none, omit
The credentialless value for COEP provides a middle ground for
cross-origin isolation without requiring all resources to have CORP.
Fixes#17
Controls inclusion and value of [`Cross-Origin-Resource-Policy`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Resource-Policy) header.
147
+
This header controls how your resources can be embedded by other origins.
148
+
Special `omit` value will disable sending the header by the module.
149
+
150
+
The default `same-site` is a safe choice that prevents cross-site embedding while allowing same-site requests.
Controls inclusion and value of [`Cross-Origin-Opener-Policy`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy) header.
159
+
This header controls window opener relationships across origins.
160
+
Special `omit` value will disable sending the header by the module.
161
+
162
+
The default is `omit` because enabling this header can break popup/window.opener communication patterns.
163
+
Enable explicitly only if you understand the implications.
Controls inclusion and value of [`Cross-Origin-Embedder-Policy`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy) header.
172
+
This header controls embedding of cross-origin resources.
173
+
Special `omit` value will disable sending the header by the module.
174
+
175
+
The default is `omit` because enabling this header can break sites that load third-party resources
176
+
(analytics, CDN assets, ads) without proper CORS headers.
177
+
178
+
### Cross-Origin Isolation
179
+
180
+
To enable [cross-origin isolation](https://web.dev/cross-origin-isolation-guide/) (required for `SharedArrayBuffer` and high-resolution timers),
181
+
configure all three cross-origin headers:
182
+
183
+
```nginx
184
+
security_headers on;
185
+
security_headers_corp same-origin;
186
+
security_headers_coop same-origin;
187
+
security_headers_coep require-corp;
188
+
```
189
+
190
+
**Warning**: This configuration will break loading of any cross-origin resources that don't explicitly allow it via CORS.
0 commit comments