Skip to content

Commit 8e3d724

Browse files
authored
Fix HttpWebServerPacFilePlugin broken routes logic (#915)
* Fix `HttpWebServerPacFilePlugin` broken routes logic * lint
1 parent d4449b8 commit 8e3d724

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

proxy/http/server/pac_plugin.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,16 @@ def __init__(self, *args: Any, **kwargs: Any) -> None:
5252
def routes(self) -> List[Tuple[int, str]]:
5353
if self.flags.pac_file_url_path:
5454
return [
55-
(httpProtocolTypes.HTTP, text_(self.flags.pac_file_url_path)),
56-
(httpProtocolTypes.HTTPS, text_(self.flags.pac_file_url_path)),
55+
(
56+
httpProtocolTypes.HTTP, r'{0}$'.format(
57+
text_(self.flags.pac_file_url_path),
58+
),
59+
),
60+
(
61+
httpProtocolTypes.HTTPS, r'{0}$'.format(
62+
text_(self.flags.pac_file_url_path),
63+
),
64+
),
5765
]
5866
return [] # pragma: no cover
5967

0 commit comments

Comments
 (0)