:8096 {
    # Forward all requests to Jellyfin
    reverse_proxy jellyfin:8096 {
        # Pass through headers
        header_up Host {host}
        header_up X-Real-IP {remote_host}
        header_up X-Forwarded-For {remote_host}
        header_up X-Forwarded-Proto {scheme}
    }

    # Handle Xbox codec filtering via external handler
    @xbox_playback {
        path /Users/*/Items/*/PlaybackInfo
        method POST
        header User-Agent *Xbox*
    }

    handle @xbox_playback {
        # Forward to Python filter service
        reverse_proxy http://xbox-filter:5000
    }
}
