Skip to content

Commit e5fefd1

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0049132 commit e5fefd1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

proxy/plugin/reverse_proxy.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,20 +40,20 @@ def routes(self) -> List[Union[str, Tuple[str, List[bytes]]]]:
4040
return [
4141
# A static route
4242
(
43-
r"/get$",
44-
[b"http://httpbingo.org/get", b"https://httpbingo.org/get"],
43+
r'/get$',
44+
[b'http://httpbingo.org/get', b'https://httpbingo.org/get'],
4545
),
4646
# A dynamic route to catch requests on "/get/<int>""
4747
# See "handle_route" method below for what we do when
4848
# this pattern matches.
49-
r"/get/(\d+)$",
49+
r'/get/(\d+)$',
5050
]
5151

5252
def handle_route(self, request: HttpParser, pattern: RePattern) -> Url:
5353
"""For our example dynamic route, we want to simply convert
5454
any incoming request to "/get/1" into "/get?id=1" when serving from upstream.
5555
"""
56-
choice: Url = Url.from_bytes(b"http://httpbingo.org/get")
56+
choice: Url = Url.from_bytes(b'http://httpbingo.org/get')
5757
assert request.path
5858
result = re.search(pattern, request.path.decode())
5959
if not result or len(result.groups()) != 1:

0 commit comments

Comments
 (0)