mirror of
				https://github.com/open-webui/mcpo
				synced 2025-06-26 18:26:58 +00:00 
			
		
		
		
	renamed prefix to path_prefix
This commit is contained in:
		
							parent
							
								
									d74e1ceeef
								
							
						
					
					
						commit
						12b61f4ed7
					
				| @ -47,8 +47,8 @@ def main( | ||||
|     ssl_keyfile: Annotated[ | ||||
|         Optional[str], typer.Option("--ssl-keyfile", "-k",  help="SSL keyfile") | ||||
|     ] = None, | ||||
|     prefix: Annotated[ | ||||
|         Optional[str], typer.Option("--prefix", "-x",  help="URL prefix") | ||||
|     path_prefix: Annotated[ | ||||
|         Optional[str], typer.Option("--path_prefix", "-x",  help="URL prefix") | ||||
|     ] = None, | ||||
| ): | ||||
|     server_command = None | ||||
| @ -109,7 +109,7 @@ def main( | ||||
|             server_command=server_command, | ||||
|             ssl_certfile=ssl_certfile, | ||||
|             ssl_keyfile=ssl_keyfile, | ||||
|             prefix=prefix, | ||||
|             path_prefix=path_prefix, | ||||
|         ) | ||||
|     ) | ||||
| 
 | ||||
|  | ||||
| @ -159,7 +159,7 @@ async def run( | ||||
|     version = kwargs.get("version") or "1.0" | ||||
|     ssl_certfile = kwargs.get("ssl_certfile") | ||||
|     ssl_keyfile= kwargs.get("ssl_keyfile") | ||||
|     prefix = kwargs.get("prefix") or "/" | ||||
|     path_prefix = kwargs.get("path_prefix") or "/" | ||||
| 
 | ||||
|     main_app = FastAPI( | ||||
|         title=name, description=description, version=version, ssl_certfile=ssl_certfile, ssl_keyfile=ssl_keyfile, lifespan=lifespan | ||||
| @ -210,7 +210,7 @@ async def run( | ||||
| 
 | ||||
|             sub_app.state.api_dependency = api_dependency | ||||
| 
 | ||||
|             main_app.mount(f"{prefix}{server_name}", sub_app) | ||||
|             main_app.mount(f"{path_prefix}{server_name}", sub_app) | ||||
| 
 | ||||
|     else: | ||||
|         raise ValueError("You must provide either server_command or config.") | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user