From ad655ae4c422495833bf9b5bff6eb297dcf8eddb Mon Sep 17 00:00:00 2001 From: mani Date: Fri, 9 Jan 2026 00:24:51 +0100 Subject: [PATCH] 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. --- docker/jellyfin-xbox-proxy/Caddyfile | 37 +++++++++++++++++----------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/docker/jellyfin-xbox-proxy/Caddyfile b/docker/jellyfin-xbox-proxy/Caddyfile index 54c3d3f..3d2a6de 100644 --- a/docker/jellyfin-xbox-proxy/Caddyfile +++ b/docker/jellyfin-xbox-proxy/Caddyfile @@ -2,19 +2,33 @@ # 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 playback ^/Users/.*/Items/.*/PlaybackInfo$ + path_regexp ^/Users/.*/Items/.*/PlaybackInfo$ header User-Agent *Xbox* } - handle @xbox_playback { - 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} - } + # 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 @@ -34,11 +48,4 @@ # Enable compression encode gzip - - # Access logging - log { - output stdout - format console - level INFO - } }