Update lots of things
This commit is contained in:
56
support/nginx/directives/gzip.directive
Normal file
56
support/nginx/directives/gzip.directive
Normal file
@ -0,0 +1,56 @@
|
||||
# Enable gzip compression.
|
||||
# Default: off
|
||||
gzip on;
|
||||
|
||||
# Compression level (1-9).
|
||||
# 5 is a perfect compromise between size and CPU usage, offering about
|
||||
# 75% reduction for most ASCII files (almost identical to level 9).
|
||||
# Default: 1
|
||||
gzip_comp_level 5;
|
||||
|
||||
# Don't compress anything that's already small and unlikely to shrink much
|
||||
# if at all (the default is 20 bytes, which is bad as that usually leads to
|
||||
# larger files after gzipping).
|
||||
# Default: 20
|
||||
gzip_min_length 256;
|
||||
|
||||
# Compress data even for clients that are connecting to us via proxies,
|
||||
# identified by the "Via" header (required for CloudFront).
|
||||
# Default: off
|
||||
gzip_proxied any;
|
||||
|
||||
# Tell proxies to cache both the gzipped and regular version of a resource
|
||||
# whenever the client's Accept-Encoding capabilities header varies;
|
||||
# Avoids the issue where a non-gzip capable client (which is extremely rare
|
||||
# today) would display gibberish if their proxy gave them the gzipped version.
|
||||
# Default: off
|
||||
gzip_vary on;
|
||||
|
||||
# Compress all output labeled with one of the following MIME-types.
|
||||
# text/html is always compressed by gzip module.
|
||||
# Default: text/html
|
||||
gzip_types
|
||||
application/atom+xml
|
||||
application/javascript
|
||||
application/json
|
||||
application/ld+json
|
||||
application/manifest+json
|
||||
application/rss+xml
|
||||
application/vnd.geo+json
|
||||
application/vnd.ms-fontobject
|
||||
application/x-font-ttf
|
||||
application/x-web-app-manifest+json
|
||||
application/xhtml+xml
|
||||
application/xml
|
||||
font/opentype
|
||||
image/bmp
|
||||
image/svg+xml
|
||||
image/x-icon
|
||||
text/cache-manifest
|
||||
text/css
|
||||
text/plain
|
||||
text/vcard
|
||||
text/vnd.rim.location.xloc
|
||||
text/vtt
|
||||
text/x-component
|
||||
text/x-cross-domain-policy;
|
@ -6,8 +6,9 @@ server {
|
||||
alias /web/acme;
|
||||
}
|
||||
|
||||
return 301 https://$host$request_uri;
|
||||
|
||||
location / {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
@ -66,12 +67,12 @@ server {
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name energy.ojuso.org;
|
||||
server_name i18n.ojuso.org;
|
||||
|
||||
ssl_certificate /web/certs/energy.ojuso.org/fullchain.pem;
|
||||
ssl_certificate_key /web/certs/energy.ojuso.org/privkey.pem;
|
||||
ssl_certificate /web/certs/i18n.ojuso.org/fullchain.pem;
|
||||
ssl_certificate_key /web/certs/i18n.ojuso.org/privkey.pem;
|
||||
ssl_dhparam /web/certs/dhparam.pem;
|
||||
ssl_trusted_certificate /web/certs/energy.ojuso.org/chain.pem;
|
||||
ssl_trusted_certificate /web/certs/i18n.ojuso.org/chain.pem;
|
||||
|
||||
include directives/*;
|
||||
|
||||
@ -79,21 +80,6 @@ server {
|
||||
|
||||
root /web/weblate/data/static;
|
||||
|
||||
gzip on;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain
|
||||
application/atom+xml
|
||||
application/rss+xml
|
||||
application/javascript
|
||||
text/xml
|
||||
text/css
|
||||
application/xml
|
||||
application/json
|
||||
image/svg+xml
|
||||
font/opentype
|
||||
application/x-font-ttf
|
||||
application/vnd.ms-fontobject;
|
||||
|
||||
location /favicon.ico {
|
||||
alias /web/weblate/data/static/favicon.ico;
|
||||
expires 30d;
|
||||
|
Reference in New Issue
Block a user