Same name in other branches
  1. 5.0.x src/Asset/AssetOptimizer.php \Drupal\advagg\Asset\AssetOptimizer::convertPathForceHttps()
  2. 6.0.x src/Asset/AssetOptimizer.php \Drupal\advagg\Asset\AssetOptimizer::convertPathForceHttps()
  3. 8.x-4.x src/Asset/AssetOptimizer.php \Drupal\advagg\Asset\AssetOptimizer::convertPathForceHttps()

Convert http:// to https://.

Paramètres

string $path: Path to check.

Return value

string The modified path or the original if already https or relative.

1 call to AssetOptimizer::convertPathForceHttps()
AssetOptimizer::processAssetArray dans src/Asset/AssetOptimizer.php
Process a core asset array.

Fichier

src/Asset/AssetOptimizer.php, line 394

Classe

AssetOptimizer
Defines the base AdvAgg optimizer.

Namespace

Drupal\advagg\Asset

Code

protected function convertPathForceHttps($path) {
    if (strpos($path, 'http://') === 0) {
        $path = 'https://' . substr($path, 7);
    }
    return $path;
}