diff --git a/roles/podman_link/templates/home/config/containers/systemd/common-zammad.env b/roles/podman_link/templates/home/config/containers/systemd/common-zammad.env index 6f3b378..975820d 100644 --- a/roles/podman_link/templates/home/config/containers/systemd/common-zammad.env +++ b/roles/podman_link/templates/home/config/containers/systemd/common-zammad.env @@ -10,4 +10,5 @@ ELASTICSEARCH_USER=admin ELASTICSEARCH_PASS={{ podman_link_opensearch_password }} ELASTICSEARCH_SCHEMA=https ELASTICSEARCH_REINDEX=false +NGINX_SERVER_SCHEME=https TZ=Etc/UTC diff --git a/roles/podman_link/templates/home/nginx.conf b/roles/podman_link/templates/home/nginx.conf index 4f32515..4ef8c70 100644 --- a/roles/podman_link/templates/home/nginx.conf +++ b/roles/podman_link/templates/home/nginx.conf @@ -61,11 +61,47 @@ server { add_header X-Content-Type-Options "nosniff" always; add_header X-XSS-Protection "1; mode=block" always; - location / { - proxy_pass http://zammad; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $remote_addr; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-Port 443; - } + client_max_body_size 50M; + + # legacy web socket server + location /ws { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $http_host; + proxy_set_header CLIENT_IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 86400; + proxy_pass http://zammad; + } + + # action cable + location /cable { + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $http_host; + proxy_set_header CLIENT_IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 86400; + proxy_pass http://zammad; + } + + location / { + proxy_set_header Host $http_host; + proxy_set_header CLIENT_IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + + proxy_set_header X-Forwarded-User ""; + + proxy_read_timeout 180; + proxy_pass http://zammad; + + gzip on; + gzip_types text/plain text/xml text/css image/svg+xml application/javascript application/x-javascript application/json application/xml; + gzip_proxied any; + } }