From 76636f670a74666737be00fd917d5beedf2b6311 Mon Sep 17 00:00:00 2001 From: arsam Date: Fri, 18 Sep 2026 23:15:19 +0330 Subject: [PATCH] Import deployment configuration: deploy/nginx/cshare.conf Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality. --- deploy/nginx/cshare.conf | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 deploy/nginx/cshare.conf diff --git a/deploy/nginx/cshare.conf b/deploy/nginx/cshare.conf new file mode 100644 index 0000000..55225f6 --- /dev/null +++ b/deploy/nginx/cshare.conf @@ -0,0 +1,53 @@ +server { + listen 80; + server_name cshare.app www.cshare.app; + + root /var/www/cshare; + index index.html; + + brotli on; + brotli_static on; + gzip on; + gzip_static on; + gzip_vary on; + gzip_types text/css application/javascript application/json image/svg+xml text/plain font/ttf; + + client_max_body_size 520M; + + location = /index.html { + add_header Cache-Control "no-cache"; + try_files $uri =404; + } + + location /assets/ { + add_header Cache-Control "public, max-age=31536000, immutable"; + try_files $uri =404; + } + + location /fonts/ { + add_header Cache-Control "public, max-age=31536000, immutable"; + try_files $uri =404; + } + + location /api/ { + proxy_pass http://127.0.0.1:4001; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_read_timeout 600s; + proxy_send_timeout 600s; + } + + location /health { + proxy_pass http://127.0.0.1:4001; + proxy_http_version 1.1; + proxy_set_header Host $host; + } + + location / { + add_header Cache-Control "no-cache"; + try_files $uri /index.html; + } +}