From ab2f4bdb61e034d06cb7934b8283ef1f04c992fa Mon Sep 17 00:00:00 2001 From: johnsonw Date: Fri, 19 Jun 2020 21:27:38 -0400 Subject: [PATCH] - Replace branding path Signed-off-by: johnsonw --- iml-config/src/nginx.rs | 2 ++ ...nx__tests__replace_template_variables.snap | 24 +++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/iml-config/src/nginx.rs b/iml-config/src/nginx.rs index cbdd91a9d5..7a23d8887a 100644 --- a/iml-config/src/nginx.rs +++ b/iml-config/src/nginx.rs @@ -41,6 +41,7 @@ const TEMPLATE_VARS: &[&str] = &[ "GRAFANA_PROXY_PASS", "INFLUXDB_PROXY_PASS", "TIMER_PROXY_PASS", + "BRANDING_PATH", "INCLUDES", ]; @@ -121,6 +122,7 @@ mod tests { env::set_var("GRAFANA_PROXY_PASS", "http://127.0.0.1:3000"); env::set_var("INFLUXDB_PROXY_PASS", "http://127.0.0.1:8086"); env::set_var("TIMER_PROXY_PASS", "http://127.0.0.1:8892"); + env::set_var("BRANDING_PATH", "ddn-favicons"); env::set_var("INCLUDES", ""); let config = replace_template_variables( diff --git a/iml-config/src/snapshots/iml_config__nginx__tests__replace_template_variables.snap b/iml-config/src/snapshots/iml_config__nginx__tests__replace_template_variables.snap index 354b424a9d..0646ab25df 100644 --- a/iml-config/src/snapshots/iml_config__nginx__tests__replace_template_variables.snap +++ b/iml-config/src/snapshots/iml_config__nginx__tests__replace_template_variables.snap @@ -74,10 +74,6 @@ server { gzip_comp_level 5; - location /favicon.ico { - alias /usr/lib/iml-manager/iml-gui/favicon.ico; - } - location /certificate/ { return 301 https://$http_host/certificate; } @@ -410,5 +406,25 @@ server { location / { try_files $uri $uri/ /index.html; } + + location ~ ^.*/favicon(.*) { + alias /usr/share/iml-manager/rust-iml-gui/ddn-favicons/favicon$1; + } + + location ~ ^.*/android-chrome(.*) { + alias /usr/share/iml-manager/rust-iml-gui/ddn-favicons/android-chrome$1; + } + + location ~ ^.*/apple-touch-icon.png { + alias /usr/share/iml-manager/rust-iml-gui/ddn-favicons/apple-touch-icon.png; + } + + location ~ ^.*/mstile-150x150.png { + alias /usr/share/iml-manager/rust-iml-gui/ddn-favicons/mstile-150x150.png; + } + + location ~ ^.*/safari-pinned-tab.svg { + alias /usr/share/iml-manager/rust-iml-gui/ddn-favicons/safari-pinned-tab.svg; + } }