Skip to content

Commit

Permalink
encode
Browse files Browse the repository at this point in the history
  • Loading branch information
ljleb committed Aug 16, 2023
1 parent e161600 commit 686ec12
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib_comfyui/webui/reverse_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ async def reverse_proxy(request: Request):


async def async_iter_raw_patched(response, proxy_route):
proxy_route_bytes = bytes(proxy_route, "utf-8")
proxy_route_bytes = proxy_route.encode("utf-8")
import_paths_to_patch = [
"/scripts/",
"/extensions/",
Expand All @@ -51,8 +51,8 @@ async def async_iter_raw_patched(response, proxy_route):
(b'/favicon', proxy_route_bytes + b'/favicon'),
*(
(
b'from "' + bytes(import_path, "utf-8"),
b'from "' + proxy_route_bytes + bytes(import_path, "utf-8"),
b'from "' + import_path.encode("utf-8"),
b'from "' + proxy_route_bytes + import_path.encode("utf-8"),
)
for import_path in import_paths_to_patch
),
Expand Down

0 comments on commit 686ec12

Please sign in to comment.