From cdf82571aca75bf728feb7db1bb7b91a85eace38 Mon Sep 17 00:00:00 2001 From: Nathanael Semhoun Date: Wed, 6 Jan 2021 09:24:57 +0100 Subject: [PATCH] Add proxy detection to make it work behind proxy like traefik --- composer.json | 3 ++- conf/middleware.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 64d8656..6eec4c8 100755 --- a/composer.json +++ b/composer.json @@ -30,6 +30,7 @@ "slim/flash": "^0.4.0", "monolog/monolog": "2.0.0", "doctrine/orm": "^2", - "symfony/console": "^4.2" + "symfony/console": "^4.2", + "semhoun/proxy-detection-middleware": "^0.5.0" } } diff --git a/conf/middleware.php b/conf/middleware.php index 31984dc..4019a5c 100755 --- a/conf/middleware.php +++ b/conf/middleware.php @@ -14,4 +14,6 @@ $app->add($container->get('session')); $app->add(TwigMiddleware::createFromContainer($app)); + + $app->add(new \RKA\Middleware\ProxyDetection()); };