diff --git a/comfy/ai-agent-extension/main.py b/comfy/ai-agent-extension/main.py index 4d73667..01edc2b 100644 --- a/comfy/ai-agent-extension/main.py +++ b/comfy/ai-agent-extension/main.py @@ -103,7 +103,7 @@ async def simple_api_key_auth(request, handler): # Allow paths that aren't /prompt or don't start with /api path = request.path restrict_apis_only = os.getenv('RESTRICT_APIS_ONLY', 'false').lower() == 'true' - if path != '/prompt' and not path.startswith('/api') and restrict_apis_only: + if path != '/prompt' and not path.startswith('/api/prompt') and restrict_apis_only: return await handler(request) auth_token = os.getenv('AGENT_PASSWORD')