This commit is contained in:
Lucas Ayres 2021-12-16 16:38:10 +03:00 committed by GitHub
commit 3e0485018f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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