Don't secure assets on localhost; it just messes with the JS debugger
This commit is contained in:
parent
94a09d0c81
commit
4f4312b944
1 changed files with 5 additions and 1 deletions
|
@ -1,5 +1,9 @@
|
|||
{{ $asset := dict }}
|
||||
{{ with resources.Get . }}
|
||||
{{ $asset = dict "Resource" . "Secure" (. | resources.Fingerprint "md5") }}
|
||||
{{ $secureAsset := . }}
|
||||
{{ if not (in (site.BaseURL | string) "localhost") }}
|
||||
{{ $secureAsset = $secureAsset | resources.Fingerprint "md5" }}
|
||||
{{ end }}
|
||||
{{ $asset = dict "Resource" . "Secure" $secureAsset }}
|
||||
{{ end }}
|
||||
{{ return $asset }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue