AutoDevReverseProxy/templates/caddy.sh

17 lines
307 B
Bash
Raw Normal View History

2022-12-13 17:04:48 +01:00
#!/usr/bin/env bash
set -e
TEMPLATE='reverse_proxy $LOCAL_WEB_HOST ${LOCAL_IP}:$LOCAL_WEB_PORT'
label_hook() {
LOCAL_WEB_PORT="${LOCAL_WEB_PORT:-80}"
}
template_hook() {
if grep -q '^reverse_proxy [^\s] [:.0-9a-e]\+:\d+$' <<< "${PARTIAL_RESULT}"
then
return 0;
fi
return 1;
}