Adds two new UI-configurable Caddy patterns that previously required raw JSON: - Per-path redirect rules (from/to/status) emitted as a subroute handler before auth so .well-known paths work without login; supports full URLs, cross-domain targets, and wildcard path patterns (e.g. /.well-known/*) - Path prefix rewrite that prepends a segment to every request before proxying (e.g. /recipes → upstream sees /recipes/original/path) Config is stored in the existing meta JSON column (no schema migration). Includes integration tests for meta serialization and E2E functional tests against a real Caddy instance covering relative/absolute destinations, all 3xx status codes, and various wildcard combinations. Adds traefik/whoami to the test stack to verify rewritten paths actually reach the upstream. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
services:
|
|
web:
|
|
environment:
|
|
SESSION_SECRET: "test-session-secret-32chars!xxxY"
|
|
ADMIN_USERNAME: testadmin
|
|
ADMIN_PASSWORD: "TestPassword2026!"
|
|
BASE_URL: http://localhost:3000
|
|
NEXTAUTH_URL: http://localhost:3000
|
|
caddy:
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
# Lightweight echo server reachable by Caddy as "echo-server:8080".
|
|
# Returns a fixed body so tests can assert the proxy routed the request.
|
|
echo-server:
|
|
image: hashicorp/http-echo
|
|
command: ["-text=echo-ok", "-listen=:8080"]
|
|
networks:
|
|
- caddy-network
|
|
# Second echo server for load-balancing tests.
|
|
# Returns a different body so tests can distinguish which upstream served the request.
|
|
echo-server-2:
|
|
image: hashicorp/http-echo
|
|
command: ["-text=echo-server-2", "-listen=:8080"]
|
|
networks:
|
|
- caddy-network
|
|
# Request-echo server: reflects the full HTTP request (method + path + headers) in the response body.
|
|
# Used by path-prefix-rewrite tests to assert that Caddy rewrote the path before forwarding.
|
|
whoami-server:
|
|
image: traefik/whoami
|
|
networks:
|
|
- caddy-network
|
|
volumes:
|
|
caddy-manager-data:
|
|
name: caddy-manager-data-test
|
|
caddy-data:
|
|
name: caddy-data-test
|
|
caddy-config:
|
|
name: caddy-config-test
|
|
caddy-logs:
|
|
name: caddy-logs-test
|
|
geoip-data:
|
|
name: geoip-data-test
|