Skip to content

Commit

Permalink
Enable httpx redirects
Browse files Browse the repository at this point in the history
The new httpx version has disabled it by default
  • Loading branch information
CastagnaIT committed Sep 13, 2023
1 parent d5bae5e commit 8c09b36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/lib/services/nfsession/session/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 8c09b36

Please sign in to comment.