From 0d817be8bcffe1c87f5a8dae222d263bb1060217 Mon Sep 17 00:00:00 2001 From: Igor Usoltsev Date: Mon, 7 Dec 2020 11:32:26 +0200 Subject: [PATCH] Add Nginx configuration notes to README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index a2212d5..f1b660b 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,19 @@ $img = Image::cache(function($image) { }, 10, true); ``` +## Server configuration + +If you have Static Resources caching enabled on Nginx please add your cache directory ({route} in config) to static resources handler exclusion: + +``` +# where "cache" is {route} +location ~* ^\/(?!cache).*\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc|webp|woff|woff2)$ { + expires max; + access_log off; + add_header Cache-Control "public"; +} +``` + ## License Intervention Imagecache Class is licensed under the [MIT License](http://opensource.org/licenses/MIT).