Fix `HttpWebServerPacFilePlugin` broken routes logic (#915)

* Fix `HttpWebServerPacFilePlugin` broken routes logic

* lint
This commit is contained in:
Abhinav Singh 2021-12-28 10:27:09 +05:30 committed by GitHub
parent d4449b8644
commit 8e3d724cd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 2 deletions

View File

@ -52,8 +52,16 @@ class HttpWebServerPacFilePlugin(HttpWebServerBasePlugin):
def routes(self) -> List[Tuple[int, str]]: def routes(self) -> List[Tuple[int, str]]:
if self.flags.pac_file_url_path: if self.flags.pac_file_url_path:
return [ return [
(httpProtocolTypes.HTTP, text_(self.flags.pac_file_url_path)), (
(httpProtocolTypes.HTTPS, text_(self.flags.pac_file_url_path)), httpProtocolTypes.HTTP, r'{0}$'.format(
text_(self.flags.pac_file_url_path),
),
),
(
httpProtocolTypes.HTTPS, r'{0}$'.format(
text_(self.flags.pac_file_url_path),
),
),
] ]
return [] # pragma: no cover return [] # pragma: no cover