Skip to content

Commit

Permalink
✨ allow http for localhost by default
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Meilick <b@bnomei.com>
  • Loading branch information
bnomei committed Feb 11, 2022
1 parent 9303e11 commit 71120ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion classes/Fingerprint.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 71120ea

Please sign in to comment.