mirror of
https://github.com/PrivSec-dev/privsec.dev.git
synced 2025-04-19 23:16:05 -04:00
Add fixes for Gravatar
Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
parent
9ee00ae034
commit
ea827f7b40
@ -68,16 +68,29 @@ add_header Permissions-Policy "accelerometer=(), ambient-light-sensor=(), autopl
|
||||
|
||||
Use the following as your [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP#:~:text=Content%20Security%20Policy%20(CSP)%20is,site%20defacement%2C%20to%20malware%20distribution.):
|
||||
|
||||
#### If you use Gravatar with SOGo
|
||||
|
||||
```
|
||||
add_header Content-Security-Policy "default-src 'none'; connect-src 'self' https://api.github.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https://www.gravatar.com; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; frame-ancestors 'none'; block-all-mixed-content; base-uri 'none'";
|
||||
add_header Content-Security-Policy "default-src 'none'; connect-src 'self' https://api.github.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data:; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; frame-ancestors 'none'; block-all-mixed-content; base-uri 'none'";
|
||||
```
|
||||
|
||||
#### If you do not use Gravatar with SOGo
|
||||
|
||||
```
|
||||
add_header Content-Security-Policy "default-src 'none'; connect-src 'self' https://api.github.com https://www.gravatar.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https://www.gravatar.com; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; frame-ancestors 'none'; block-all-mixed-content; base-uri 'none'";
|
||||
```
|
||||
|
||||
### CORP, COEP, COOP
|
||||
|
||||
Mailcow does not use any cross site scripts, images, or documents. Thus, you should set these headers to their strictest configuration:
|
||||
Mailcow does not use any cross site scripts, or documents. Thus, you should set CORP and COOP headers to their strictest configuration:
|
||||
|
||||
```
|
||||
add_header Cross-Origin-Opener-Policy same-origin;
|
||||
add_header Cross-Origin-Embedder-Policy require-corp;
|
||||
add_header Cross-Origin-Resource-Policy same-origin;
|
||||
```
|
||||
|
||||
If you do not use Gravatar with SOGo, you can also set COEP to require-corp:
|
||||
|
||||
```
|
||||
add_header Cross-Origin-Embedder-Policy require-corp;
|
||||
```
|
Loading…
x
Reference in New Issue
Block a user