Files
dokku/plugins/openresty-vhosts/proxy-supports-routes
T
Jose Diaz-Gonzalez ffd5248cc3 feat: route paths to non-web processes via proxy:route
Adds proxy:route:set/remove/clear/report so users can declare path-prefix routes to non-web Procfile processes without hand-writing nginx.conf.sigil. Routes are stored on the proxy plugin as a PropertyMap of path to process:port:strip, with set semantics so each invocation produces a fully-determined state and re-application is idempotent. A proxy-supports-routes capability trigger gates the command per backend - nginx-vhosts, traefik-vhosts, caddy-vhosts, and scheduler-k3s render routes today; openresty-vhosts and haproxy-vhosts refuse until their sidecar images learn a path-prefix vocabulary (tracked in dokku/openresty-docker-proxy#137 and the haproxy sidecar). Closes #8725.
2026-11-04 14:56:38 -05:00

21 lines
615 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
trigger-openresty-vhosts-proxy-supports-routes() {
declare desc="advertises path-based routing support for openresty (currently false)"
declare trigger="proxy-supports-routes"
declare APP="$1"
if [[ "$(plugn trigger proxy-type "$APP")" != "openresty" ]]; then
return
fi
# The openresty sidecar image does not yet accept path-prefix routing labels.
# Tracked upstream at dokku/openresty-docker-proxy#137.
echo "false"
}
trigger-openresty-vhosts-proxy-supports-routes "$@"