From a18ed6afa94d93cca9d84f072a7b82b2095669b2 Mon Sep 17 00:00:00 2001 From: theoboldt Date: Sat, 7 Dec 2024 08:56:17 +0100 Subject: [PATCH] Updated docker configuration --- app/docker/build/php-apache/php_dev.ini | 2 ++ app/docker/build/php-apache/php_prod.ini | 2 ++ app/web/app_dev.php | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/docker/build/php-apache/php_dev.ini b/app/docker/build/php-apache/php_dev.ini index 836b104a..df256778 100644 --- a/app/docker/build/php-apache/php_dev.ini +++ b/app/docker/build/php-apache/php_dev.ini @@ -2,6 +2,8 @@ memory_limit = 768M max_execution_time = 120 +error_reporting = E_ALL ^ E_NOTICE + [xdebug] ; activate xdebug via env variable XDEBUG_MODE,XDEBUG_SESSION xdebug.mode = off diff --git a/app/docker/build/php-apache/php_prod.ini b/app/docker/build/php-apache/php_prod.ini index 75ba67f7..75294222 100644 --- a/app/docker/build/php-apache/php_prod.ini +++ b/app/docker/build/php-apache/php_prod.ini @@ -11,5 +11,7 @@ post_max_size = 128M realpath_cache_size = 4096K realpath_cache_ttl = 600 +error_reporting = 0 + [mbstring] mbstring.func_overload = 0 diff --git a/app/web/app_dev.php b/app/web/app_dev.php index b56e9462..ba10e85c 100644 --- a/app/web/app_dev.php +++ b/app/web/app_dev.php @@ -13,10 +13,10 @@ // Feel free to remove this, extend it, or make something more sophisticated. if (isset($_SERVER['HTTP_CLIENT_IP']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) - || !(in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1')) || php_sapi_name() === 'cli-server') + || !(in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', '172.18.0.1', 'fe80::1', '::1')) || php_sapi_name() === 'cli-server') ) { header('HTTP/1.0 403 Forbidden'); - exit('You are not allowed to access this file.'); + exit('You '.$_SERVER['REMOTE_ADDR'].' are not allowed to access this file.'); } /**