You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if req_header "$method""$host""$path""$auth""X-Upstream">/dev/null 2>&1;then
49
+
echo"FAIL: unexpected upstream proxy for $host$path">&2
50
+
exit 1
51
+
fi
52
+
echo"OK: no upstream proxy header for $host$path"
53
+
}
54
+
55
+
echo"Starting isolated E2E stack..."
56
+
docker compose -f "$COMPOSE_FILE" up -d --wait
57
+
58
+
# landing.* protected endpoints
59
+
assert_eq "$(req_code GET landing.test /backup/status none)""401""landing /backup/status requires auth"
60
+
assert_eq "$(req_code GET landing.test /backup/status auth)""200""landing /backup/status works with auth"
61
+
assert_eq "$(req_code GET landing.test /backup/names none)""401""landing /backup/names requires auth"
62
+
assert_eq "$(req_code GET landing.test /backup/names auth)""200""landing /backup/names works with auth"
63
+
assert_eq "$(req_code GET landing.test /api/me none)""401""landing /api/me requires auth"
64
+
assert_eq "$(req_code GET landing.test /api/me auth)""200""landing /api/me works with auth"
65
+
66
+
# Ensure no broad /backup/* passthrough remains
67
+
assert_eq "$(req_code GET landing.test /backup/rest/workflows auth)""404""landing /backup/rest/workflows is not proxied"
68
+
assert_no_upstream_header GET landing.test /backup/rest/workflows auth
69
+
70
+
# workflow.* protected webhook path
71
+
assert_eq "$(req_code POST workflow.test /webhook/protected none)""401""workflow protected webhook requires auth without mTLS/exception"
72
+
assert_eq "$(req_code POST workflow.test /webhook/protected auth)""200""workflow protected webhook works with auth"
73
+
74
+
# Explicit Telegram exception (no auth but header secret)
75
+
assert_eq "$(req_code POST workflow.test /webhook/scanservjs/telegram/reissue none "X-Telegram-Bot-Api-Secret-Token: test-telegram-secret")""200""telegram exception works without auth when secret header matches"
76
+
assert_eq "$(req_code POST workflow.test /webhook/scanservjs/telegram/reissue none)""401""telegram path without secret remains protected"
0 commit comments