Modify cache-control

This commit is contained in:
sk81.biz@gmail.com 2023-01-31 14:40:06 +03:00
parent f704d7f4df
commit ad770ac01c

View File

@ -24,11 +24,10 @@ map $request_uri $header_x_frame_options {
map $request_uri $cache_control {
default "no-cache, no-store, must-revalidate";
~*\/(storage\/room_logos\/root\/|storage\/userPhotos\/root\/) "public, max-age=3153600";
~*\/(images|favicon.ico.*) "must-revalidate, immutable, no-transform, max-age=31536000";
~*\/(api\/2\.0.*|storage|login\.ashx|products\/.+\/httphandlers\/filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md) "no-cache, no-store, must-revalidate";
~*\/(api\/2\.0.*|storage|login\.ashx|products\/.+\/httphandlers\/filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md|static\/scripts.*) "no-cache, no-store, must-revalidate";
~*\/(locales.*\.json) "must-revalidate, immutable, no-transform, max-age=86400";
~*\.(ogg|ogv|svg|svgz|eot|otf|woff|woff2|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|md|css|js)$ "must-revalidate, immutable, no-transform, max-age=31536000";
~*\/(images|favicon.ico.*)|\.(js)|\/(storage\/room_logos\/root\/|storage\/userPhotos\/root\/) "must-revalidate, immutable, no-transform, max-age=31536000";
~*\.(ogg|ogv|svg|svgz|eot|otf|woff|woff2|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf|md|css|js)$ "must-revalidate, immutable, no-transform, max-age=0";
}
include /etc/nginx/includes/onlyoffice-*.conf;