From f8dec15535959d382e5d1e840c40b9d7c3036b4b Mon Sep 17 00:00:00 2001 From: "srvproxy001.itguys.com.br" Date: Sat, 25 Oct 2025 22:25:49 -0300 Subject: [PATCH] =?UTF-8?q?[Auto-Sync]=20Atualiza=C3=A7=C3=A3o=20das=20con?= =?UTF-8?q?figura=C3=A7=C3=B5es=20em=20srvproxy001.itguys.com.br=20-=20202?= =?UTF-8?q?5-10-25=2022:25:49?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../verbocloud.itguys.com.br.conf | 35 +++++++++---------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/nginx/sites-available/verbocloud.itguys.com.br.conf b/nginx/sites-available/verbocloud.itguys.com.br.conf index f418369..98bdd3e 100644 --- a/nginx/sites-available/verbocloud.itguys.com.br.conf +++ b/nginx/sites-available/verbocloud.itguys.com.br.conf @@ -190,24 +190,23 @@ server { add_header 'X-Cache-FolderTree' $upstream_cache_status always; } -# # Cache de APIs de Sessão (acelera 'Deck', 'Notes', 'Tasks', Notificações) -# location ~ ^/(ocs/v[12].php/cloud/users|ocs/v[12].php/privatedata/get|ocs/v2.php/apps/notifications/api/v2/notifications|ocs/v[12].php/cloud/apps|ocs/v[12].php/cloud/user) { -# proxy_pass http://nextcloud_aio_backend; -# 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_http_version 1.1; -# proxy_set_header Connection ""; -# proxy_buffering on; - -# proxy_cache verbocloud_session_cache; # <-- Usa cache exclusivo -# proxy_cache_key "$host$request_uri|$cookie_nc_session_id"; -# proxy_cache_valid 200 5s; # Cache curto (5 segundos) -# proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; -# -# add_header 'X-Cache-API-Session' $upstream_cache_status always; -# } + # Cache de APIs de Sessão (acelera 'Deck', 'Notes', 'Tasks', Notificações) + location ~ ^/(ocs/v[12].php/cloud/users|ocs/v[12].php/privatedata/get|ocs/v2.php/apps/notifications/api/v2/notifications|ocs/v[12].php/cloud/apps|ocs/v[12].php/cloud/user) { + proxy_pass http://nextcloud_aio_backend; + 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_http_version 1.1; + proxy_set_header Connection ""; + proxy_buffering on; + proxy_cache verbocloud_session_cache; # <-- Usa cache exclusivo + proxy_cache_key "$host$request_uri|$cookie_nc_session_id"; + proxy_cache_valid 200 5s; # Cache curto (5 segundos) + proxy_cache_use_stale error timeout http_500 http_502 http_503 http_504; + + add_header 'X-Cache-API-Session' $upstream_cache_status always; + } # Cache de Estáticos (Opcional, mas bom para performance) location ~ \.(css|js|svg|gif|png|jpg|ico|woff|woff2|tff)$ {