Added expires directive and map to nginx, allowing browser to cache rspamd JS,CSS and image files.
parent
3f9e0a8023
commit
64fbc73582
|
@ -7,6 +7,13 @@ map $http_x_forwarded_proto $client_req_scheme {
|
|||
https https;
|
||||
}
|
||||
|
||||
map $sent_http_content_type $expires {
|
||||
default off;
|
||||
text/css 1d;
|
||||
application/javascript 1d;
|
||||
~image/ 1d;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
@ -81,6 +88,7 @@ server {
|
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_redirect off;
|
||||
expires $expires;
|
||||
}
|
||||
|
||||
location ~* ^/Autodiscover/Autodiscover.xml {
|
||||
|
@ -263,6 +271,7 @@ server {
|
|||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_redirect off;
|
||||
expires $expires;
|
||||
}
|
||||
|
||||
location ~* ^/Autodiscover/Autodiscover.xml {
|
||||
|
|
Loading…
Reference in New Issue