From d320b2ea1c1519016065c80a76b8e4268b60dc9c Mon Sep 17 00:00:00 2001 From: reid Date: Tue, 20 Sep 2022 21:59:41 -0500 Subject: [PATCH] fix 502 --- api/caddy_api.py | 2 +- caddy/Dockerfile | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/caddy_api.py b/api/caddy_api.py index 673e16a..eed47f6 100644 --- a/api/caddy_api.py +++ b/api/caddy_api.py @@ -193,7 +193,7 @@ def add_502(): ) ] )]) - api(path='apps/http/servers/srv0/errors', method='POST', data=errors) + api_post(path='apps/http/servers/srv0/errors', data=errors) return True # Basic API call pattern diff --git a/caddy/Dockerfile b/caddy/Dockerfile index fcacd00..53a047f 100644 --- a/caddy/Dockerfile +++ b/caddy/Dockerfile @@ -14,6 +14,7 @@ RUN chmod +x /usr/bin/caddy RUN apk add --no-cache libcap curl RUN setcap 'cap_net_bind_service=+ep' /usr/bin/caddy COPY ./default_config.json /etc/caddy/ +COPY ./www/502.html /www/ RUN echo "#!/bin/ash" > /init RUN echo "ip route add 10.13.13.0/24 via 172.20.0.2" >> /init RUN echo "exec caddy run --config /etc/caddy/default_config.json --resume" >> /init