public/index.php line 27

Open in your IDE?
  1. <?php
  2. //=====================================================================================================
  3. //=================== Mode Maintenance ==================================================================================
  4. // $ipmathilde = "5.10.133.125";
  5. // $ipherve = gethostbyname('save.herve-mirguet.fr');
  6. // $ippubligo = gethostbyname('nas.publigo.fr');
  7. // $bouygues = "176.164.88.48";
  8. // if($_SERVER['REQUEST_URI'] == "/" 
  9. //     && $_SERVER['REMOTE_ADDR'] != $ippubligo 
  10. //     && $_SERVER['REMOTE_ADDR'] != $ipherve 
  11. //     && $_SERVER['REMOTE_ADDR'] != $ipmathilde 
  12. //     && $_SERVER['REMOTE_ADDR'] != $bouygues) 
  13. // {
  14. //     include 'maintenance.php';
  15. //     die();
  16. // }
  17. //=====================================================================================================
  18. //=====================================================================================================
  19. if($_SERVER['REQUEST_SCHEME'] == "http") {
  20.     header("Status: 301 Moved Permanently"false301);
  21.     header('Location: https://'.$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"]);
  22. }
  23. use App\Kernel;
  24. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  25. return function (array $context) {
  26.     date_default_timezone_set'Europe/Paris' );
  27.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  28. };