From b709f41fa048071687a0cd7addf8b9b45dad4052 Mon Sep 17 00:00:00 2001 From: Timofey Boyko Date: Sat, 27 Apr 2024 12:32:13 +0300 Subject: [PATCH] Nginx: fix config for login --- config/nginx/onlyoffice.conf | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/config/nginx/onlyoffice.conf b/config/nginx/onlyoffice.conf index 2a579f7f19..75dd217093 100644 --- a/config/nginx/onlyoffice.conf +++ b/config/nginx/onlyoffice.conf @@ -46,7 +46,7 @@ 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.*|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\/sdk\/.*|static\/scripts\/api\.poly\.js) "no-cache, no-store, no-transform"; - ~*\/(static\/images\/.*)|\.(js|woff|woff2|css)|(locales.*\.json) "must-revalidate, no-transform, immutable, max-age=31536000"; + ~*\/(static\/images\/.*)|\/(_next\/public\/images\/.*)|\.(js|woff|woff2|css)|(locales.*\.json) "must-revalidate, no-transform, immutable, max-age=31536000"; } map $request_uri $content_security_policy { @@ -229,17 +229,9 @@ server { proxy_pass http://127.0.0.1:5011; proxy_redirect off; - location ~* /static/favicon.ico { - try_files /$basename /index.html =404; - } - - location ~* /static/images/(.*)$ { + location ~* /_next/public/images/(.*)$ { try_files /images/$1 /index.html =404; } - - location ~* /static/css/ { - try_files /css/$basename /index.html =404; - } } location /management {