From 8c09b36826f8dfdc6c4c6c00ed339ac76e931e54 Mon Sep 17 00:00:00 2001
From: CastagnaIT <gottardo.stefano.83@gmail.com>
Date: Fri, 28 Oct 2022 19:26:52 +0200
Subject: [PATCH] Enable httpx redirects

The new httpx version has disabled it by default
---
 resources/lib/services/nfsession/session/base.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/resources/lib/services/nfsession/session/base.py b/resources/lib/services/nfsession/session/base.py
index 907c0c81a..d1c0e023c 100644
--- a/resources/lib/services/nfsession/session/base.py
+++ b/resources/lib/services/nfsession/session/base.py
@@ -44,7 +44,7 @@ def _init_session(self):
         import httpx
         # (http1=False, http2=True) means that the client know that server support HTTP/2 and avoid to do negotiations,
         # prior knowledge: https://python-hyper.org/projects/hyper-h2/en/v2.3.1/negotiating-http2.html#prior-knowledge
-        self.session = httpx.Client(http1=False, http2=True)
+        self.session = httpx.Client(http1=False, http2=True, follow_redirects=True)
         self.session.max_redirects = 10  # Too much redirects should means some problem
         self.session.headers.update({
             'User-Agent': common.get_user_agent(enable_android_mediaflag_fix=True),