From 6293559499d4932198e1f9c2c07c191709c371f2 Mon Sep 17 00:00:00 2001 From: Andrey Savihin Date: Tue, 26 Mar 2024 18:48:58 +0300 Subject: [PATCH 1/7] nginx: added route to logo handler --- config/nginx/onlyoffice.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/nginx/onlyoffice.conf b/config/nginx/onlyoffice.conf index a28ead6678..5fac744aa1 100644 --- a/config/nginx/onlyoffice.conf +++ b/config/nginx/onlyoffice.conf @@ -345,6 +345,10 @@ server { proxy_pass http://127.0.0.1:5000; } + location /logo.ashx { + proxy_pass http://127.0.0.1:5000; + } + location /payment.ashx { proxy_pass http://127.0.0.1:5000; } From 76e5537e32135433eeeedd58337f74959927eb61 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Tue, 2 Apr 2024 11:17:03 +0300 Subject: [PATCH 2/7] Nginx: Added cache control for logos --- config/nginx/onlyoffice.conf | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/config/nginx/onlyoffice.conf b/config/nginx/onlyoffice.conf index 5fac744aa1..8b9cd202d3 100644 --- a/config/nginx/onlyoffice.conf +++ b/config/nginx/onlyoffice.conf @@ -44,8 +44,9 @@ map $request_uri $header_x_frame_options { map $request_uri $cache_control { default "no-cache, no-store, no-transform"; -~*\/(filehandler\.ashx\?action=(thumb|preview))|\/(storage\/room_logos\/root\/.*\?hash.*|storage\/userPhotos\/root\/.*\?hash.*) "must-revalidate, no-transform, immutable, max-age=31536000"; ~*\/(api\/2\.0.*|storage|login\.ashx|filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md|static\/scripts\/api\.js|static\/scripts\/api\.poly\.js) "no-cache, no-store, no-transform"; - ~*\/(images|favicon.ico.*)|\.(js|woff|woff2|css)|(locales.*\.json) "must-revalidate, no-transform, immutable, max-age=31536000"; + ~*\/(filehandler\.ashx\?action=(thumb|preview))|\/(storage\/room_logos\/root\/.*\?hash.*|storage\/userPhotos\/root\/.*\?hash.*|storage\/whitelabel\/root\/.*\?hash.*|storage\/static_partnerdata\/root\/.*\?hash.*) "must-revalidate, no-transform, immutable, max-age=31536000"; + ~*\/(api\/2\.0.*|storage|login\.ashx|filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md|static\/scripts\/api\.js|static\/scripts\/api\.poly\.js) "no-cache, no-store, no-transform"; + ~*\/(images\/logo)|\.(js|woff|woff2|css)|(locales.*\.json) "must-revalidate, no-transform, immutable, max-age=31536000"; } map $request_uri $content_security_policy { @@ -159,7 +160,7 @@ server { location / { proxy_pass http://127.0.0.1:5001; proxy_redirect off; - location ~* /(manifest.json|sw.js|appIcon(.)*\.png|icon.svg|bg-error.png|favicon.ico|debuginfo.md) { + location ~* /(manifest.json|sw.js|appIcon(.)*\.png|icon.svg|bg-error.png|debuginfo.md) { try_files /$basename /index.html =404; } @@ -311,10 +312,13 @@ server { location ~* /plugins { proxy_pass http://127.0.0.1:5014; - } location ~* /migration { - proxy_pass http://127.0.0.1:5034; - } - } + } + + location ~* /migration { + proxy_pass http://127.0.0.1:5034; + } + } + location /sso { rewrite sso/(.*) /$1 break; proxy_pass http://127.0.0.1:9834; From cb9d330cecab8150e75a4b363b56d14bb73a5e00 Mon Sep 17 00:00:00 2001 From: Ilya Oleshko Date: Wed, 3 Apr 2024 17:51:36 +0300 Subject: [PATCH 3/7] Nginx: Html: Added favicon for custom error pages --- config/nginx/html/custom_401.html | 1 + config/nginx/html/custom_403.html | 1 + config/nginx/html/custom_404.html | 1 + config/nginx/html/custom_50x.html | 1 + 4 files changed, 4 insertions(+) diff --git a/config/nginx/html/custom_401.html b/config/nginx/html/custom_401.html index 6941f0bab9..4a7e7814fa 100644 --- a/config/nginx/html/custom_401.html +++ b/config/nginx/html/custom_401.html @@ -3,6 +3,7 @@ + 401 Error Page