mirror of
https://github.com/typemill/typemill.git
synced 2025-08-05 05:37:45 +02:00
Fixed if proxy activated and set back twig base-path to original
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user