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.
This commit is contained in:
@@ -2,19 +2,33 @@
|
|||||||
# Routes Xbox PlaybackInfo to Python filter, everything else to Jellyfin directly
|
# Routes Xbox PlaybackInfo to Python filter, everything else to Jellyfin directly
|
||||||
|
|
||||||
:8096 {
|
: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 PlaybackInfo requests with Xbox in User-Agent go to Python filter
|
||||||
@xbox_playback {
|
@xbox_playback {
|
||||||
path_regexp playback ^/Users/.*/Items/.*/PlaybackInfo$
|
path_regexp ^/Users/.*/Items/.*/PlaybackInfo$
|
||||||
header User-Agent *Xbox*
|
header User-Agent *Xbox*
|
||||||
}
|
}
|
||||||
|
|
||||||
handle @xbox_playback {
|
# Test: Route ALL PlaybackInfo requests to filter first (ignore User-Agent)
|
||||||
reverse_proxy xbox-filter:8096 {
|
@all_playback {
|
||||||
header_up Host {host}
|
path_regexp ^/Users/.*/Items/.*/PlaybackInfo$
|
||||||
header_up X-Real-IP {remote_host}
|
}
|
||||||
header_up X-Forwarded-For {remote_host}
|
|
||||||
header_up X-Forwarded-Proto {scheme}
|
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
|
# All other requests go directly to Jellyfin
|
||||||
@@ -34,11 +48,4 @@
|
|||||||
|
|
||||||
# Enable compression
|
# Enable compression
|
||||||
encode gzip
|
encode gzip
|
||||||
|
|
||||||
# Access logging
|
|
||||||
log {
|
|
||||||
output stdout
|
|
||||||
format console
|
|
||||||
level INFO
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user