diff --git a/plugins/nginx-vhosts/functions b/plugins/nginx-vhosts/functions index 19503179298..74f6cd93142 100755 --- a/plugins/nginx-vhosts/functions +++ b/plugins/nginx-vhosts/functions @@ -226,6 +226,7 @@ nginx_build_config() { CUSTOM_NGINX_TEMPLATE="$(plugn trigger nginx-app-template-source "$APP" "app-config")" if [[ -n "$CUSTOM_NGINX_TEMPLATE" ]]; then + local NGINX_TEMPLATE_SOURCE="plugin-supplied" NGINX_TEMPLATE="$CUSTOM_NGINX_TEMPLATE" fi diff --git a/plugins/nginx-vhosts/internal-functions b/plugins/nginx-vhosts/internal-functions index f2a752d55e1..92455ee1e9a 100755 --- a/plugins/nginx-vhosts/internal-functions +++ b/plugins/nginx-vhosts/internal-functions @@ -460,9 +460,13 @@ fn-nginx-vhosts-manage-hsts() { local HSTS_PRELOAD="$(fn-nginx-computed-hsts-preload "$APP")" local NGINX_HSTS_CONF="$DOKKU_ROOT/$APP/nginx.conf.d/hsts.conf" local HSTS_TEMPLATE="$PLUGIN_AVAILABLE_PATH/nginx-vhosts/templates/hsts.conf.sigil" + local NGINX_TEMPLATE_SOURCE="built-in" + local is_custom_hsts_template=false CUSTOM_HSTS_TEMPLATE="$(plugn trigger nginx-app-template-source "$APP" "hsts-config")" if [[ -n "$CUSTOM_HSTS_TEMPLATE" ]]; then + is_custom_hsts_template=true + NGINX_TEMPLATE_SOURCE="plugin-supplied" HSTS_TEMPLATE="$CUSTOM_HSTS_TEMPLATE" fi @@ -471,7 +475,7 @@ fn-nginx-vhosts-manage-hsts() { return fi - dokku_log_verbose_quiet "Enabling HSTS" + dokku_log_verbose_quiet "Enabling HSTS (using $NGINX_TEMPLATE_SOURCE template)" local HSTS_HEADERS="" if [[ -n "$HSTS_MAX_AGE" ]]; then HSTS_HEADERS="max-age=$HSTS_MAX_AGE"