Merge 3a31ef4a17
into 7c02ff637a
This commit is contained in:
commit
3e0485018f
1 changed files with 14 additions and 0 deletions
14
nginx.tmpl
14
nginx.tmpl
|
@ -83,6 +83,16 @@ map $proxy_x_forwarded_proto $proxy_x_forwarded_ssl {
|
|||
https on;
|
||||
}
|
||||
|
||||
# Expires map
|
||||
map $sent_http_content_type $expires {
|
||||
default off;
|
||||
~application/ 30d;
|
||||
~text/ 30d;
|
||||
~audio/ 365d;
|
||||
~video/ 365d;
|
||||
~image/ 365d;
|
||||
}
|
||||
|
||||
gzip_types text/plain text/css application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
|
||||
|
||||
log_format vhost '$host $remote_addr - $remote_user [$time_local] '
|
||||
|
@ -298,6 +308,8 @@ server {
|
|||
{{ end }}
|
||||
{{ $access_log }}
|
||||
|
||||
expires $expires;
|
||||
|
||||
{{ if eq $network_tag "internal" }}
|
||||
# Only allow traffic from internal clients
|
||||
include /etc/nginx/network_internal.conf;
|
||||
|
@ -373,6 +385,8 @@ server {
|
|||
{{ end }}
|
||||
{{ $access_log }}
|
||||
|
||||
expires $expires;
|
||||
|
||||
{{ if eq $network_tag "internal" }}
|
||||
# Only allow traffic from internal clients
|
||||
include /etc/nginx/network_internal.conf;
|
||||
|
|
Loading…
Reference in a new issue