File tree Expand file tree Collapse file tree 1 file changed +18
-16
lines changed
Expand file tree Collapse file tree 1 file changed +18
-16
lines changed Original file line number Diff line number Diff line change @@ -656,22 +656,24 @@ async def _configure_proxy(
656656 self , private_proxy : bool , proxy_credentials : tuple [Optional [str ], Optional [str ]]
657657 ):
658658 """Setup proxy authentication handling if needed."""
659- if private_proxy :
660- await self .enable_fetch_events (handle_auth_requests = True )
661- await self .on (
662- FetchEvent .REQUEST_PAUSED ,
663- self ._continue_request_callback ,
664- temporary = True ,
665- )
666- await self .on (
667- FetchEvent .AUTH_REQUIRED ,
668- partial (
669- self ._continue_request_with_auth_callback ,
670- proxy_username = proxy_credentials [0 ],
671- proxy_password = proxy_credentials [1 ],
672- ),
673- temporary = True ,
674- )
659+ if not private_proxy :
660+ return
661+
662+ await self .enable_fetch_events (handle_auth_requests = True )
663+ await self .on (
664+ FetchEvent .REQUEST_PAUSED ,
665+ self ._continue_request_callback ,
666+ temporary = True ,
667+ )
668+ await self .on (
669+ FetchEvent .AUTH_REQUIRED ,
670+ partial (
671+ self ._continue_request_with_auth_callback ,
672+ proxy_username = proxy_credentials [0 ],
673+ proxy_password = proxy_credentials [1 ],
674+ ),
675+ temporary = True ,
676+ )
675677
676678 @staticmethod
677679 def _is_valid_tab (target : TargetInfo ) -> bool :
You can’t perform that action at this time.
0 commit comments