Skip to content

feat: auto-infer port from QDRANT_URL for reverse proxy support#11

Open
midweste wants to merge 1 commit intogiancarloerra:mainfrom
midweste:midweste-qdrantport
Open

feat: auto-infer port from QDRANT_URL for reverse proxy support#11
midweste wants to merge 1 commit intogiancarloerra:mainfrom
midweste:midweste-qdrantport

Conversation

@midweste
Copy link

Summary

Auto-infer the Qdrant REST port from QDRANT_URL so that HTTPS connections through reverse proxies (e.g. Cloudflare Tunnel) work without requiring an explicit port. Previously, the Qdrant JS client would default to port 6333 even for HTTPS URLs, causing connection failures.

Changes

  • Added a resolveQdrantPort() helper to the constants module that extracts the port from a URL: explicit port if present, 443 for HTTPS, 6333 for HTTP
  • Updated the Qdrant client initialization to use resolveQdrantPort() instead of inline URL parsing
  • Updated README.md to document the port auto-inference behavior in the QDRANT_URL env var description
  • Added 4 unit tests covering explicit ports, HTTPS/HTTP defaults, and URLs with paths

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Documentation update
  • Test coverage improvement

Testing

  • Unit tests pass (npm run test:unit)
  • Integration tests pass (npm run test:integration) — if applicable
  • TypeScript compiles cleanly (npx tsc --noEmit)
  • New tests added for new/changed functionality

Checklist

  • My code follows the existing code style and conventions
  • I have added/updated JSDoc comments where appropriate
  • I have updated documentation (README.md / DEVELOPER.md) if needed
  • I have read the Contributing Guide
  • I agree to the Contributor License Agreement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant