From 6ac3a49db25953f2b29c6b69714a1d54533e2751 Mon Sep 17 00:00:00 2001 From: MartinH0 Date: Fri, 31 Jan 2020 01:36:17 +0100 Subject: [PATCH] Updated nginx.conf (optimization for future) 1. changed location from "~" (case sensitive!) to "~*" (case insensitive!) to also match uppercase static assets. (http://nginx.org/en/docs/http/ngx_http_core_module.html#location) 2. added regex "jpe?g" to match "jpg" and "jpeg" in one command. --- config/docker/nginx.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/docker/nginx.conf b/config/docker/nginx.conf index ddc24af8..b401b0ee 100644 --- a/config/docker/nginx.conf +++ b/config/docker/nginx.conf @@ -5,7 +5,7 @@ server { index index.html; # When requesting static paths with extension, try them, and return a 404 if not found - location ~ .+\.(css|js|html|png|jpg|jpeg|gif|bmp|ico|json|csv|otf|eot|svg|svgz|ttf|woff|woff2|ijmap|pdf|tif|map) { + location ~* .+\.(css|js|html|png|jpe?g|gif|bmp|ico|json|csv|otf|eot|svg|svgz|ttf|woff|woff2|ijmap|pdf|tif|map) { try_files $uri $uri/ =404; }