Added caching to the docker image
This commit is contained in:
parent
551d848a4e
commit
78272ae4cd
2 changed files with 15 additions and 0 deletions
11
nginx.conf
11
nginx.conf
|
|
@ -36,6 +36,15 @@ http {
|
|||
gzip_min_length 256;
|
||||
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml font/woff2 text/html image/x-icon;
|
||||
|
||||
# Expires map
|
||||
map $sent_http_content_type $expires {
|
||||
default off;
|
||||
text/html epoch; # We don't cache the html for the browser to get the content
|
||||
text/css max;
|
||||
application/javascript max;
|
||||
~image/ max;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen 81 default_server http2 proxy_protocol; ## Needed when behind HAProxy with SSL termination + HTTP/2 support
|
||||
|
|
@ -43,6 +52,8 @@ http {
|
|||
|
||||
server_name _;
|
||||
|
||||
expires $expires;
|
||||
|
||||
ssl_certificate /etc/nginx/ssl/dummy.crt;
|
||||
ssl_certificate_key /etc/nginx/ssl/dummy.key;
|
||||
|
||||
|
|
|
|||
Reference in a new issue