Skip to content

Commit

Permalink
Merge pull request #434 from esign/v4
Browse files Browse the repository at this point in the history
Fix environment check
  • Loading branch information
Tam authored Apr 12, 2023
2 parents 7975db8 + 2330ab7 commit 19d1303
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/SeoService.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use craft\base\Component;
use craft\base\Element;
use craft\base\Field;
use craft\helpers\App;
use ether\seo\fields\SeoField;
use ether\seo\models\data\SeoData;

Expand All @@ -22,7 +23,7 @@ public function injectRobots ()
{
$headers = Craft::$app->getResponse()->getHeaders();

$env = getenv('ENVIRONMENT') ?? getenv('CRAFT_ENVIRONMENT');
$env = App::env('ENVIRONMENT') ?? App::env('CRAFT_ENVIRONMENT');

// Always noindex except on production environment
if ($env !== 'production')
Expand Down

0 comments on commit 19d1303

Please sign in to comment.