mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
commit
5f19573f1c
2 changed files with 11 additions and 8 deletions
|
@ -4,7 +4,7 @@ set $allowed_origins "https://${sandbox_domain}";
|
||||||
set $api_domain "__DOMAIN__";
|
set $api_domain "__DOMAIN__";
|
||||||
set $files_domain "__DOMAIN__";
|
set $files_domain "__DOMAIN__";
|
||||||
ssl_ecdh_curve secp384r1;
|
ssl_ecdh_curve secp384r1;
|
||||||
more_set_headers "Strict-Transport-Security: 'max-age=31536000; includeSubDomains' always";
|
more_set_headers "Strict-Transport-Security: max-age=31536000; includeSubDomains; always";
|
||||||
more_set_headers "X-XSS-Protection: '1; mode=block'";
|
more_set_headers "X-XSS-Protection: '1; mode=block'";
|
||||||
more_set_headers "X-Content-Type-Options: nosniff";
|
more_set_headers "X-Content-Type-Options: nosniff";
|
||||||
more_set_headers "Access-Control-Allow-Origin: '${allowed_origins}'";
|
more_set_headers "Access-Control-Allow-Origin: '${allowed_origins}'";
|
||||||
|
@ -21,7 +21,7 @@ if ($args ~ ver=) {
|
||||||
}
|
}
|
||||||
more_set_headers "Cache-Control: $cacheControl";
|
more_set_headers "Cache-Control: $cacheControl";
|
||||||
set $styleSrc "'unsafe-inline' 'self' https://${main_domain}";
|
set $styleSrc "'unsafe-inline' 'self' https://${main_domain}";
|
||||||
set $connectSrc "'self' blob: https://${main_domain} https://${sandbox_domain} wss://${main_domain}";
|
set $connectSrc "'self' https://${main_domain} blob: wss://${api_domain} https://${sandbox_domain}";
|
||||||
set $fontSrc "'self' data: https://${main_domain}";
|
set $fontSrc "'self' data: https://${main_domain}";
|
||||||
set $imgSrc "'self' data: blob: https://${main_domain}";
|
set $imgSrc "'self' data: blob: https://${main_domain}";
|
||||||
set $frameSrc "'self' https://${sandbox_domain} blob:";
|
set $frameSrc "'self' https://${sandbox_domain} blob:";
|
||||||
|
@ -67,9 +67,9 @@ location ~ ^/api/.*$ {
|
||||||
}
|
}
|
||||||
location ^~ /blob/ {
|
location ^~ /blob/ {
|
||||||
if ($request_method = 'OPTIONS') {
|
if ($request_method = 'OPTIONS') {
|
||||||
more_set_headers "Access-Control-Allow-Origin: '${allowed_origins}'";
|
more_set_headers "Access-Control-Allow-Origin: ${allowed_origins}";
|
||||||
more_set_headers "Access-Control-Allow-Methods: 'GET, POST, OPTIONS'";
|
more_set_headers "Access-Control-Allow-Methods: 'GET, POST, OPTIONS'";
|
||||||
more_set_headers "Access-Control-Allow-Headers: 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'";
|
more_set_headers "Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range";
|
||||||
more_set_headers "Access-Control-Max-Age: 1728000";
|
more_set_headers "Access-Control-Max-Age: 1728000";
|
||||||
more_set_headers "Content-Type: 'application/octet-stream; charset=utf-8'";
|
more_set_headers "Content-Type: 'application/octet-stream; charset=utf-8'";
|
||||||
more_set_headers "Content-Length: 0";
|
more_set_headers "Content-Length: 0";
|
||||||
|
@ -77,10 +77,10 @@ location ^~ /blob/ {
|
||||||
}
|
}
|
||||||
more_set_headers "X-Content-Type-Options: nosniff";
|
more_set_headers "X-Content-Type-Options: nosniff";
|
||||||
more_set_headers "Cache-Control: max-age=31536000'";
|
more_set_headers "Cache-Control: max-age=31536000'";
|
||||||
more_set_headers "Access-Control-Allow-Origin: '${allowed_origins}'";
|
more_set_headers "Access-Control-Allow-Origin: ${allowed_origins}";
|
||||||
more_set_headers "Access-Control-Allow-Methods: 'GET, POST, OPTIONS'";
|
more_set_headers "Access-Control-Allow-Methods: 'GET, POST, OPTIONS'";
|
||||||
more_set_headers "Access-Control-Allow-Headers: 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Content-Length'";
|
more_set_headers "Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Content-Length";
|
||||||
more_set_headers "Access-Control-Expose-Headers: 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Content-Length'";
|
more_set_headers "Access-Control-Expose-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range,Content-Length";
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
}
|
}
|
||||||
location ^~ /block/ {
|
location ^~ /block/ {
|
||||||
|
|
|
@ -2,12 +2,15 @@ We have added a sandbox domain: __SANDBOXDOMAIN__ for you but you still need to
|
||||||
You will need also to restart CryptPad service after this is done.
|
You will need also to restart CryptPad service after this is done.
|
||||||
|
|
||||||
Then you can please open CryptPad domain: https://__DOMAIN__
|
Then you can please open CryptPad domain: https://__DOMAIN__
|
||||||
|
|
||||||
Once CryptPad is installed, create an account via the Sign Up button on the home page which will take you to the Register page.
|
Once CryptPad is installed, create an account via the Sign Up button on the home page which will take you to the Register page.
|
||||||
To make this account an instance administrator:
|
To make this account an instance administrator:
|
||||||
|
|
||||||
1. Copy the public key found in User Menu (avatar at the top right) > Settings > Account > Public Signing Key
|
1. Copy the public key found in User Menu (avatar at the top right) > Settings > Account > Public Signing Key
|
||||||
2. Paste this key in /var/www/cryptpad/config/config.js in the following array (uncomment and replace the placeholder):
|
2. Paste this key in `/var/www/cryptpad/config/config.js` in the following array (uncomment and replace the placeholder):
|
||||||
|
|
||||||
|
```
|
||||||
adminKeys: [
|
adminKeys: [
|
||||||
"[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]",
|
"[cryptpad-user1@my.awesome.website/YZgXQxKR0Rcb6r6CmxHPdAGLVludrAF2lEnkbx1vVOo=]",
|
||||||
],
|
],
|
||||||
|
```
|
||||||
|
|
Loading…
Reference in a new issue