parent
d7fc6c362d
commit
8db768bd61
|
@ -63,9 +63,3 @@ gzip_types
|
||||||
text/vtt
|
text/vtt
|
||||||
text/x-component
|
text/x-component
|
||||||
text/x-cross-domain-policy;
|
text/x-cross-domain-policy;
|
||||||
|
|
||||||
# This should be turned on if you are going to have pre-compressed copies (.gz)
|
|
||||||
# of static files available. If not it should be left off as it will cause extra
|
|
||||||
# I/O for the check. It is best if you enable this in a `location` block for a
|
|
||||||
# specific directory, or on an individual `server` level.
|
|
||||||
# gzip_static on;
|
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# | Brotli pre-compressed content |
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Serve brotli compressed files if they exist and if the client accepts brotli
|
||||||
|
# encoding.
|
||||||
|
#
|
||||||
|
# (!) To make this part relevant, you need to generate encoded files by your
|
||||||
|
# own. Enabling this part will not auto-generate brotlied files.
|
||||||
|
#
|
||||||
|
# Note that some clients (eg. browsers) require a secure connection to request
|
||||||
|
# brotli-compressed resources.
|
||||||
|
# https://www.chromestatus.com/feature/5420797577396224
|
||||||
|
#
|
||||||
|
# https://github.com/eustas/ngx_brotli/#brotli_static
|
||||||
|
|
||||||
|
brotli_static on;
|
|
@ -0,0 +1,13 @@
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
# | GZip pre-compressed content |
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
# Serve gzip compressed files if they exist and if the client accepts gzip
|
||||||
|
# encoding.
|
||||||
|
#
|
||||||
|
# (!) To make this part relevant, you need to generate encoded files by your
|
||||||
|
# own. Enabling this part will not auto-generate gziped files.
|
||||||
|
#
|
||||||
|
# https://nginx.org/en/docs/http/ngx_http_gzip_static_module.html
|
||||||
|
|
||||||
|
gzip_static on;
|
|
@ -25,6 +25,6 @@ server {
|
||||||
include h5bp/errors/custom_errors.conf;
|
include h5bp/errors/custom_errors.conf;
|
||||||
|
|
||||||
location ~* /test-pre-gzip {
|
location ~* /test-pre-gzip {
|
||||||
gzip_static on;
|
include h5bp/web_performance/pre-compressed_content_gzip.conf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue