Skip to content

Commit 2e8bde3

Browse files
committed
feat: Add a --no-auth flag to disable auth in the server with cforge serve
#9 Branch: ServeNoAuthFlag-9 Signed-off-by: Gabe Goodhart <ghart@us.ibm.com>
1 parent aaa9fd3 commit 2e8bde3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

cforge/commands/server/serve.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def serve(
3232
port: int = typer.Option(DEFAULT_PORT, "--port", help="Port to bind to"),
3333
reload: bool = typer.Option(False, "--reload", help="Enable auto-reload for development"),
3434
headless: bool = typer.Option(False, "--headless", help="Run without the admin UI"),
35+
no_auth: bool = typer.Option(False, "--no-auth", help="Run without requiring authorization"),
3536
workers: int = typer.Option(1, "--workers", help="Number of worker processes"),
3637
log_level: str = typer.Option("info", "--log-level", help="Log level (debug, info, warning, error, critical)"),
3738
) -> None:
@@ -42,6 +43,7 @@ def serve(
4243
set_serve_settings(
4344
mcpgateway_ui_enabled=not headless,
4445
mcpgateway_admin_api_enabled=not headless,
46+
auth_required=not no_auth,
4547
)
4648
uvicorn.run(
4749
DEFAULT_APP,

0 commit comments

Comments
 (0)