[feature] Custom base path on FastAPI server (#5879)
Co-authored-by: lianhu.yin <lianhu.yin@nio.com> Co-authored-by: kebyn <kebyn@kebyn.cc> Co-authored-by: Liangsheng Yin <lsyincs@gmail.com>
This commit is contained in:
@@ -243,6 +243,7 @@ class ServerArgs:
|
||||
# HTTP server
|
||||
host: str = "127.0.0.1"
|
||||
port: int = 30000
|
||||
fastapi_root_path: str = ""
|
||||
grpc_mode: bool = False
|
||||
skip_server_warmup: bool = False
|
||||
warmups: Optional[str] = None
|
||||
@@ -2024,6 +2025,12 @@ class ServerArgs:
|
||||
default=ServerArgs.port,
|
||||
help="The port of the HTTP server.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--fastapi-root-path",
|
||||
type=str,
|
||||
default=ServerArgs.fastapi_root_path,
|
||||
help="App is behind a path based routing proxy.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--grpc-mode",
|
||||
action="store_true",
|
||||
|
||||
Reference in New Issue
Block a user