mirror of
https://github.com/dokku/dokku.git
synced 2026-02-23 19:50:34 +01:00
feat: send Host header when running container checks in docker-local
Closes #7456
This commit is contained in:
@@ -148,6 +148,19 @@ trigger-scheduler-docker-local-check-deploy() {
|
||||
ARG_ARRAY+=("$DOKKU_APP_LISTEN_PORT")
|
||||
fi
|
||||
|
||||
local app_vhosts="$(plugn trigger domains-list "$APP")"
|
||||
if [[ -n "$app_vhosts" ]]; then
|
||||
for app_vhost in $app_vhosts; do
|
||||
if [[ "$app_vhost" == "localhost" ]] || [[ "$app_vhost" == '*' ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
ARG_ARRAY+=("--header")
|
||||
ARG_ARRAY+=("Host: $app_vhost")
|
||||
break
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ "$DOKKU_APP_CONTAINER_TYPE" == "web" ]]; then
|
||||
content="$(docker-container-healthchecker add "$DOKKU_APP_CONTAINER_TYPE" --app-json "$TMP_APP_JSON_OUTPUT" --listening-check --name "port listening check" --port "$DOKKU_APP_LISTEN_PORT" --pretty --warn-only)"
|
||||
echo "$content" >"$TMP_APP_JSON_OUTPUT"
|
||||
|
||||
Reference in New Issue
Block a user