Files
dokku/plugins/proxy/functions
2016-03-08 15:30:34 -05:00

25 lines
682 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/config/functions"
is_app_proxy_enabled() {
declare desc="return true if proxy is enabled; otherwise return false"
local APP="$1"; verify_app_name "$APP"
local APP_PROXY_ENABLED=true
local DOKKU_DISABLE_PROXY=$(config_get "$APP" DOKKU_DISABLE_PROXY)
if [[ -n "$DOKKU_DISABLE_PROXY" ]]; then
local APP_PROXY_ENABLED=false
fi
echo $APP_PROXY_ENABLED
}
get_app_proxy_type() {
declare desc="return app proxy type"
local APP="$1"; verify_app_name "$APP"
local APP_PROXY_TYPE="nginx"
echo $APP_PROXY_TYPE
}