File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11from abc import ABC , abstractmethod
22from functools import cached_property
3+ from os import PathLike
34from typing import Any , Optional
5+ from urllib .parse import quote
46
57import requests
68import requests_unixsocket
@@ -74,16 +76,16 @@ def render(
7476class SocketServerRenderer (ServerRenderer ):
7577 """Connect to a vue-ssr-service server via a UNIX socket."""
7678
77- def __init__ (self , socket : str ):
79+ def __init__ (self , socket : PathLike | str ):
7880 """
7981 :param socket: The path to the Unix socket.
8082 """
81- self .unix_socket = socket
83+ self .unix_socket = str ( socket )
8284 self ._session = requests_unixsocket .Session ()
8385
8486 @cached_property
8587 def address (self ) -> str :
86- return f"http+unix://{ self .unix_socket } "
88+ return f"http+unix://{ quote ( self .unix_socket , safe = '' ) } "
8789
8890
8991class ViteRenderer (SSRRenderer ):
You can’t perform that action at this time.
0 commit comments