diff --git a/classes/Fingerprint.php b/classes/Fingerprint.php index 2c27cf4..42a1300 100644 --- a/classes/Fingerprint.php +++ b/classes/Fingerprint.php @@ -84,7 +84,7 @@ public function apply(string $option, $file) */ public function https($url) { - if ($this->option('https')) { + if ($this->option('https') && !kirby()->system()->isLocal()) { $url = str_replace('http://', 'https://', $url); } return $url; diff --git a/readme.md b/readme.md index 8c71d6c..5e6e794 100644 --- a/readme.md +++ b/readme.md @@ -86,12 +86,12 @@ echo Bnomei\Fingerprint::js( ## Settings -| bnomei.fingerprint. | Default | Description | -|---------------------------|----------------|---------------------------| -| hash | `callback` | will lead to the hashing logic | -| integrity | `callback` | use it to set option `'integrity' => null,` | -| https | `true` | boolean value or callback to force *https* scheme. | -| query | `true` or `string` or `callback` | `myfile.js?v={HASH}`, `myfile.{HASH}.js` or loaded from manifest file | +| bnomei.fingerprint. | Default | Description | +|---------------------------|----------------|-------------------------------------------------------------------------------------| +| hash | `callback` | will lead to the hashing logic | +| integrity | `callback` | use it to set option `'integrity' => null,` | +| https | `true` | boolean value or callback to force *https* scheme on all but localhost enviroments. | +| query | `true` or `string` or `callback` | `myfile.js?v={HASH}`, `myfile.{HASH}.js` or loaded from manifest file | ### Query option: true (default)