Cleanup of unused vars and treafik forwarding #20

Open
ineiti wants to merge 1 commits from cleanup into main
3 changed files with 26 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
export CONFIG_VERSION=v3
export CONFIG_JS_VERSION=v2
export NGINX_CONF_VERSION=v3
export NGINX_CONF_VERSION=v4
export INFRA_JS_VERSION=v1
export SSO_ENTRYPOINT_VERSION=v8
export SSO_JS_VERSION=v3
-4
View File
@@ -11,10 +11,6 @@ services:
- CRYPTPAD_ADMIN_KEYS
- "CPAD_MAIN_DOMAIN=https://${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"
- "RESTRICT_GUEST_ACCESS=${RESTRICT_GUEST_ACCESS:-false}"
volumes:
+25 -4
View File
@@ -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 {
listen 8083;
server_name localhost;
@@ -17,9 +36,10 @@ server {
proxy_pass $cryptpad_upstream;
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-Proto $scheme;
proxy_set_header X-Forwarded-Proto $forwarded_proto;
proxy_set_header X-Forwarded-Host $forwarded_host;
client_max_body_size 150m;
@@ -33,9 +53,10 @@ server {
proxy_pass $cryptpad_upstream;
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-Proto $scheme;
proxy_set_header X-Forwarded-Proto $forwarded_proto;
proxy_set_header X-Forwarded-Host $forwarded_host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;