diff --git a/app/Http/Middleware/StartupCheck.php b/app/Http/Middleware/StartupCheck.php index c87e405df8..08b586b80f 100644 --- a/app/Http/Middleware/StartupCheck.php +++ b/app/Http/Middleware/StartupCheck.php @@ -33,7 +33,7 @@ class StartupCheck } // Ensure all request are over HTTPS in production - if (App::environment() == ENV_PRODUCTION && !Request::secure()) { + if (Utils::isNinjaProd() && !Request::secure()) { return Redirect::secure(Request::getRequestUri()); } diff --git a/app/Http/routes.php b/app/Http/routes.php index d43d27283d..354697e661 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -247,7 +247,6 @@ if (!defined('CONTACT_EMAIL')) { define('ENV_DEVELOPMENT', 'local'); define('ENV_STAGING', 'staging'); - define('ENV_PRODUCTION', 'fortrabbit'); define('RECENTLY_VIEWED', 'RECENTLY_VIEWED'); define('ENTITY_CLIENT', 'client'); diff --git a/app/Libraries/Utils.php b/app/Libraries/Utils.php index ab03f9796b..a8c74d2b64 100644 --- a/app/Libraries/Utils.php +++ b/app/Libraries/Utils.php @@ -45,11 +45,6 @@ class Utils return file_exists(storage_path() . '/framework/down'); } - public static function isProd() - { - return App::environment() == ENV_PRODUCTION; - } - public static function isNinja() { return self::isNinjaProd() || self::isNinjaDev();