mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-22 13:01:11 +03:00
Fixed port handling so it returns the correct port and not only 6663
This commit is contained in:
@@ -257,14 +257,18 @@ class Qdrant_VectorStores implements INode {
|
||||
* @param qdrantServerUrl the url to get the port from
|
||||
*/
|
||||
static determinePortByUrl(qdrantServerUrl: string) :number {
|
||||
let port = 6333;
|
||||
const parsedUrl = new URL(qdrantServerUrl);
|
||||
|
||||
let port = parsedUrl.port ? parseInt(parsedUrl.port) : 6663
|
||||
|
||||
if (parsedUrl.protocol === 'https:' && parsedUrl.port === '') {
|
||||
port = 443;
|
||||
}
|
||||
if (parsedUrl.protocol === 'http:' && parsedUrl.port === '') {
|
||||
port = 80;
|
||||
}
|
||||
|
||||
|
||||
return port;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user