Merge pull request #995 from Alireza2n/master
SOGO & Rspamd interface: adding "expire" header to static files, allowing browser to be able to cache themmaster
commit
993c998716
|
@ -7,6 +7,15 @@ map $http_x_forwarded_proto $client_req_scheme {
|
||||||
https https;
|
https https;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
map $sent_http_content_type $expires {
|
||||||
|
default off;
|
||||||
|
text/html off;
|
||||||
|
text/css 1d;
|
||||||
|
application/javascript 1d;
|
||||||
|
application/json off;
|
||||||
|
image/png 1d;
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
include /etc/nginx/mime.types;
|
include /etc/nginx/mime.types;
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
@ -74,6 +83,7 @@ server {
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
expires $expires;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^/Autodiscover/Autodiscover.xml {
|
location ~* ^/Autodiscover/Autodiscover.xml {
|
||||||
|
@ -144,6 +154,7 @@ server {
|
||||||
proxy_cache_valid 200 1d;
|
proxy_cache_valid 200 1d;
|
||||||
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
||||||
#alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
#alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
||||||
|
expires $expires;
|
||||||
allow all;
|
allow all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,6 +165,7 @@ server {
|
||||||
proxy_cache_valid 200 1d;
|
proxy_cache_valid 200 1d;
|
||||||
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
||||||
#alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
#alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
||||||
|
expires $expires;
|
||||||
allow all;
|
allow all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -256,6 +268,7 @@ server {
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_redirect off;
|
proxy_redirect off;
|
||||||
|
expires $expires;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^/Autodiscover/Autodiscover.xml {
|
location ~* ^/Autodiscover/Autodiscover.xml {
|
||||||
|
@ -326,6 +339,7 @@ server {
|
||||||
proxy_cache_valid 200 1d;
|
proxy_cache_valid 200 1d;
|
||||||
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
||||||
#alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
#alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
||||||
|
expires $expires;
|
||||||
allow all;
|
allow all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,6 +350,7 @@ server {
|
||||||
proxy_cache_valid 200 1d;
|
proxy_cache_valid 200 1d;
|
||||||
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_503 http_504;
|
||||||
#alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
#alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
||||||
|
expires $expires;
|
||||||
allow all;
|
allow all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue