Nginx: Added cache control for logos

This commit is contained in:
Ilya Oleshko 2024-04-02 11:17:03 +03:00
parent 4deb425ad3
commit 76e5537e32

View File

@ -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;