From 0c6b3d9425ff6e4314d65cce007d3cfd11d530a0 Mon Sep 17 00:00:00 2001 From: trendschau Date: Wed, 7 Oct 2020 20:54:36 +0200 Subject: [PATCH] Fixed if proxy activated and set back twig base-path to original --- system/system.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/system/system.php b/system/system.php index db75fe2..904f012 100644 --- a/system/system.php +++ b/system/system.php @@ -48,7 +48,7 @@ $app = new \Slim\App($settings); $container = $app->getContainer(); -if($settings['settings']['proxy']) +if(isset($settings['settings']['proxy']) && $settings['settings']['proxy']) { $trustedProxies = isset($settings['settings']['trustedproxies']) ? explode(",", $settings['settings']['trustedproxies']) : []; $app->add(new RKA\Middleware\ProxyDetection($trustedProxies)); @@ -251,7 +251,6 @@ $container['view'] = function ($container) use ($uri) # use {{ base_url() }} in twig templates $view['base_url'] = $uri->getBaseUrl(); - $view['base_url'] = $basePath; $view['current_url'] = $uri->getPath(); /* if session route, add flash messages and csrf-protection */