-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# ---------------------------------------------------------------------- | ||
# | Cross Origin Policy | | ||
# ---------------------------------------------------------------------- | ||
|
||
# Set strict a Cross Origin Policy to mitigate information leakage. | ||
# | ||
# (1) Cross-Origin-Embedder-Policy prevents a document from loading any | ||
# cross-origin resources that don’t explicitly grant the document | ||
# permission. | ||
# https://html.spec.whatwg.org/multipage/origin.html#coep | ||
# https://owasp.org/www-project-secure-headers/#cross-origin-embedder-policy | ||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy | ||
# | ||
# (2) Cross-Origin-Opener-Policy allows you to ensure a top-level document does | ||
# not share a browsing context group with cross-origin documents. | ||
# https://html.spec.whatwg.org/multipage/origin.html#cross-origin-opener-policies | ||
# https://owasp.org/www-project-secure-headers/#cross-origin-opener-policy | ||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Opener-Policy | ||
# | ||
# (3) Cross-Origin-Resource-Policy allows to define a policy that lets web | ||
# sites and applications opt in to protection against certain requests from | ||
# other origins, to mitigate speculative side-channel attacks. | ||
# https://fetch.spec.whatwg.org/#cross-origin-resource-policy-header | ||
# https://owasp.org/www-project-secure-headers/#cross-origin-resource-policy | ||
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Resource-Policy | ||
# https://resourcepolicy.fyi/ | ||
# | ||
# To check your Cross Origin Policy, you can use an online service, such as: | ||
# https://securityheaders.com/ | ||
# https://observatory.mozilla.org/ | ||
# | ||
# https://web.dev/coop-coep/ | ||
# https://web.dev/why-coop-coep/ | ||
# https://web.dev/cross-origin-isolation-guide/ | ||
# https://scotthelme.co.uk/coop-and-coep/ | ||
|
||
# (1) | ||
add_header Cross-Origin-Embedder-Policy $coep_policy always; | ||
|
||
# (2) | ||
add_header Cross-Origin-Opener-Policy $coop_policy always; | ||
|
||
# (3) | ||
add_header Cross-Origin-Resource-Policy $corp_policy always; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters