这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugins/nginx-vhosts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 5 additions & 1 deletion plugins/nginx-vhosts/internal-functions
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
Expand Down