refactor: drop proxy-supports-routes capability trigger
The trigger was added to refuse proxy:route:set under openresty and haproxy, but the hard refusal created an ordering dependency for declarative tools and blocked users from staging routes ahead of a backend switch. Routes are now stored regardless of the active backend and silently ignored by backends that do not render them; the docs call out the inert behavior under openresty and haproxy.
This commit is contained in:
11 files changed
+8
-167
No files matched your search
@@ -2390,27 +2390,6 @@ while IFS='|' read -r proc port path strip; do
|
||||
done < <(plugn trigger proxy-routes-list "$APP")
|
||||
```
|
||||
|
||||
### `proxy-supports-routes`
|
||||
|
||||
- Description: Returns `true` if the proxy backend currently selected for the app supports path-based routes (`proxy:route:set`), `false` otherwise. Implemented by each in-tree proxy plugin (nginx, traefik, caddy, and k3s return `true`; openresty and haproxy return `false`). The `proxy:route:set` command calls this trigger and refuses with a "not supported" message when the result is `false`.
|
||||
- Invoked by: `proxy:route:set` in the `proxy` plugin
|
||||
- Arguments: `$APP`
|
||||
- Example:
|
||||
|
||||
```shell
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
APP="$1"
|
||||
|
||||
if [[ "$(plugn trigger proxy-type "$APP")" != "my-proxy" ]]; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "true"
|
||||
```
|
||||
|
||||
### `proxy-type`
|
||||
|
||||
- Description: Returns the proxy type for an app
|
||||
|
||||
Reference in new issue
Block a user