Files
mani ad655ae4c4 Debug: Add test response for PlaybackInfo matching
Testing if path_regexp works by returning debug response
instead of proxying. This will show:
1. If the path is matched correctly
2. What User-Agent header is received

Once confirmed working, uncomment reverse_proxy lines.
2026-01-09 00:24:51 +01:00

52 lines
1.4 KiB
Caddyfile

# Caddyfile for Jellyfin Xbox Codec Filter Proxy
# Routes Xbox PlaybackInfo to Python filter, everything else to Jellyfin directly
:8096 {
# Debug: Log all requests
log {
output stdout
format json
level DEBUG
}
# Xbox PlaybackInfo requests with Xbox in User-Agent go to Python filter
@xbox_playback {
path_regexp ^/Users/.*/Items/.*/PlaybackInfo$
header User-Agent *Xbox*
}
# Test: Route ALL PlaybackInfo requests to filter first (ignore User-Agent)
@all_playback {
path_regexp ^/Users/.*/Items/.*/PlaybackInfo$
}
handle @all_playback {
respond "Matched PlaybackInfo - User-Agent: {http.request.header.User-Agent}" 200
# Uncomment when working:
# reverse_proxy xbox-filter:8096 {
# header_up Host {host}
# header_up X-Real-IP {remote_host}
# header_up X-Forwarded-For {remote_host}
# header_up X-Forwarded-Proto {scheme}
# }
}
# All other requests go directly to Jellyfin
handle {
reverse_proxy jellyfin:8096 {
header_up Host {host}
header_up X-Real-IP {remote_host}
header_up X-Forwarded-For {remote_host}
header_up X-Forwarded-Proto {scheme}
# Enable WebSocket support
transport http {
versions h2c 1.1
}
}
}
# Enable compression
encode gzip
}