test(caddy): fix automated testing

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-07-19 04:44:34 +00:00
parent 06122fcd89
commit a47e781d91
7 changed files with 10 additions and 15 deletions

View File

@@ -1,12 +1,5 @@
:80 {
reverse_proxy http://anubis:3000 {
header_up X-Real-Ip {remote_host}
header_up X-Http-Version {http.request.proto}
}
}
:443 {
tls /etc/techaro/pki/caddy.local.cetacean.club/cert.pem /etc/techaro/pki/caddy.local.cetacean.club/key.pem
caddy.local.cetacean.club {
tls internal
reverse_proxy http://anubis:3000 {
header_up X-Real-Ip {remote_host}

View File

@@ -5,8 +5,6 @@ services:
ports:
- 8080:80
- 8443:443
volumes:
- "../pki/caddy.local.cetacean.club:/etc/techaro/pki/caddy.local.cetacean.club/"
anubis:
image: ko.local/anubis

View File

@@ -1,6 +1,6 @@
async function testWithUserAgent(userAgent) {
const statusCode =
await fetch("https://relayd.local.cetacean.club:8443/reqmeta", {
await fetch("https://caddy.local.cetacean.club:8443/reqmeta", {
headers: {
"User-Agent": userAgent,
}

View File

@@ -10,4 +10,6 @@ docker compose up -d --build
export NODE_TLS_REJECT_UNAUTHORIZED=0
sleep 2
backoff-retry node test.mjs