We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3bc7df1 commit 59a09dcCopy full SHA for 59a09dc
1 file changed
rootfs/etc/confd/templates/config.inc.tmpl
@@ -97,7 +97,7 @@ restful_urls = On
97
; Example:
98
; allowed_hosts = '["myjournal.tld", "anotherjournal.tld", "mylibrary.tld"]'
99
{{- $url := getenv "OJS_BASE_URL" -}}
100
-{{- $cleaned := $url | replace "http://" "" | replace "https://" "" -}}
+{{- $cleaned := $url | replace $url "http://" "" -1 | replace $url "https://" "" -1 -}}
101
{{- $host := index (split $cleaned "/") 0 -}}
102
{{- $domain := index (split $host ":") 0 -}}
103
allowed_hosts = '["localhost", "{{ $domain }}"]'
0 commit comments