Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
565e8c0f97 |
@@ -1,6 +1,6 @@
|
|||||||
export CONFIG_VERSION=v3
|
export CONFIG_VERSION=v3
|
||||||
export CONFIG_JS_VERSION=v2
|
export CONFIG_JS_VERSION=v2
|
||||||
export NGINX_CONF_VERSION=v3
|
export NGINX_CONF_VERSION=v4
|
||||||
export INFRA_JS_VERSION=v1
|
export INFRA_JS_VERSION=v1
|
||||||
export SSO_ENTRYPOINT_VERSION=v8
|
export SSO_ENTRYPOINT_VERSION=v8
|
||||||
export SSO_JS_VERSION=v3
|
export SSO_JS_VERSION=v3
|
||||||
|
|||||||
@@ -11,10 +11,6 @@ services:
|
|||||||
- CRYPTPAD_ADMIN_KEYS
|
- CRYPTPAD_ADMIN_KEYS
|
||||||
- "CPAD_MAIN_DOMAIN=https://${DOMAIN}"
|
- "CPAD_MAIN_DOMAIN=https://${DOMAIN}"
|
||||||
- "CPAD_SANDBOX_DOMAIN=https://${SANDBOX_DOMAIN}"
|
- "CPAD_SANDBOX_DOMAIN=https://${SANDBOX_DOMAIN}"
|
||||||
# Traefik can't use HTTP2 to communicate with cryptpad_websocket
|
|
||||||
# A workaroung is disabling HTTP2 in Nginx
|
|
||||||
- "CPAD_HTTP2_DISABLE=true"
|
|
||||||
- "CPAD_TRUST_PROXY=1"
|
|
||||||
- "CPAD_CONF=/cryptpad/config/config.js"
|
- "CPAD_CONF=/cryptpad/config/config.js"
|
||||||
- "RESTRICT_GUEST_ACCESS=${RESTRICT_GUEST_ACCESS:-false}"
|
- "RESTRICT_GUEST_ACCESS=${RESTRICT_GUEST_ACCESS:-false}"
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
+25
-4
@@ -1,3 +1,22 @@
|
|||||||
|
# Traefik terminates TLS and sets X-Forwarded-* / X-Real-IP. Pass its values
|
||||||
|
# through to CryptPad instead of overwriting them with nginx's own view
|
||||||
|
# (which would be plain http and Traefik's container IP). Fall back to
|
||||||
|
# nginx's values when the headers are absent.
|
||||||
|
map $http_x_forwarded_proto $forwarded_proto {
|
||||||
|
default $http_x_forwarded_proto;
|
||||||
|
"" $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
map $http_x_forwarded_host $forwarded_host {
|
||||||
|
default $http_x_forwarded_host;
|
||||||
|
"" $host;
|
||||||
|
}
|
||||||
|
|
||||||
|
map $http_x_real_ip $forwarded_real_ip {
|
||||||
|
default $http_x_real_ip;
|
||||||
|
"" $remote_addr;
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 8083;
|
listen 8083;
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
@@ -17,9 +36,10 @@ server {
|
|||||||
proxy_pass $cryptpad_upstream;
|
proxy_pass $cryptpad_upstream;
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $forwarded_real_ip;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $forwarded_proto;
|
||||||
|
proxy_set_header X-Forwarded-Host $forwarded_host;
|
||||||
|
|
||||||
client_max_body_size 150m;
|
client_max_body_size 150m;
|
||||||
|
|
||||||
@@ -33,9 +53,10 @@ server {
|
|||||||
proxy_pass $cryptpad_upstream;
|
proxy_pass $cryptpad_upstream;
|
||||||
|
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $forwarded_real_ip;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $forwarded_proto;
|
||||||
|
proxy_set_header X-Forwarded-Host $forwarded_host;
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
|||||||
Reference in New Issue
Block a user