mirror of
https://github.com/Andre0512/pyhOn.git
synced 2026-01-07 03:02:47 +00:00
Implement custom scheme handling in _manual_redirect
Add custom scheme handling in manual redirect method.
This commit is contained in:
parent
59e3d9949f
commit
9f1194ac69
|
|
@ -133,6 +133,10 @@ class HonAuth:
|
|||
return login_url[0]
|
||||
|
||||
async def _manual_redirect(self, url: str) -> str:
|
||||
# Add custom scheme handling before the GET request
|
||||
if any(url.startswith(s) for s in ['hon://', 'candy://', 'hoover://', 'rosieres://']):
|
||||
return url
|
||||
|
||||
async with self._request.get(url, allow_redirects=False) as response:
|
||||
new_location = response.headers.get("Location", "")
|
||||
if not new_location:
|
||||
|
|
|
|||
Loading…
Reference in a new issue