From 5af660134c27190d24bd9d0db2b13897452f5d7a Mon Sep 17 00:00:00 2001 From: Chris Cook Date: Tue, 14 May 2019 10:17:17 +1000 Subject: [PATCH] [GOVCMSD8-363] Tweaks to nginx helpers (#44) * Add numeric prefix to helpers inline with Amazee base image. * Add include directives to expires location to allow additional config to be loaded. --- .docker/images/nginx/helpers/{blocks.conf => 200-blocks.conf} | 0 .../images/nginx/helpers/{expires.conf => 210-expires.conf} | 4 ++++ .../images/nginx/helpers/{hotlink.conf => 220-hotlink.conf} | 0 3 files changed, 4 insertions(+) rename .docker/images/nginx/helpers/{blocks.conf => 200-blocks.conf} (100%) rename .docker/images/nginx/helpers/{expires.conf => 210-expires.conf} (69%) rename .docker/images/nginx/helpers/{hotlink.conf => 220-hotlink.conf} (100%) diff --git a/.docker/images/nginx/helpers/blocks.conf b/.docker/images/nginx/helpers/200-blocks.conf similarity index 100% rename from .docker/images/nginx/helpers/blocks.conf rename to .docker/images/nginx/helpers/200-blocks.conf diff --git a/.docker/images/nginx/helpers/expires.conf b/.docker/images/nginx/helpers/210-expires.conf similarity index 69% rename from .docker/images/nginx/helpers/expires.conf rename to .docker/images/nginx/helpers/210-expires.conf index 841106d4..546624ba 100644 --- a/.docker/images/nginx/helpers/expires.conf +++ b/.docker/images/nginx/helpers/210-expires.conf @@ -1,4 +1,8 @@ # Only cache binary files for 30 minutes. These are the default allowed file extensions uploads that are not images. location ~* ^/sites/default/files/.+\.(pdf|doc|docx|txt|xls|xlsx|ppt|pptx|pps|ppsx|odt|ods|odp|mp3|mov|mp4|m4a|m4v|mpeg|avi|ogg|oga|ogv|weba|webp|webm)$ { + include /etc/nginx/conf.d/drupal/location_expires_prepend*.conf; + expires ${BINARY_FILES_EXPIRES:-1800s}; + + include /etc/nginx/conf.d/drupal/location_expires_append*.conf; } diff --git a/.docker/images/nginx/helpers/hotlink.conf b/.docker/images/nginx/helpers/220-hotlink.conf similarity index 100% rename from .docker/images/nginx/helpers/hotlink.conf rename to .docker/images/nginx/helpers/220-hotlink.conf