mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-29 07:01:04 +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
|
* @param qdrantServerUrl the url to get the port from
|
||||||
*/
|
*/
|
||||||
static determinePortByUrl(qdrantServerUrl: string) :number {
|
static determinePortByUrl(qdrantServerUrl: string) :number {
|
||||||
let port = 6333;
|
|
||||||
const parsedUrl = new URL(qdrantServerUrl);
|
const parsedUrl = new URL(qdrantServerUrl);
|
||||||
|
|
||||||
|
let port = parsedUrl.port ? parseInt(parsedUrl.port) : 6663
|
||||||
|
|
||||||
if (parsedUrl.protocol === 'https:' && parsedUrl.port === '') {
|
if (parsedUrl.protocol === 'https:' && parsedUrl.port === '') {
|
||||||
port = 443;
|
port = 443;
|
||||||
}
|
}
|
||||||
if (parsedUrl.protocol === 'http:' && parsedUrl.port === '') {
|
if (parsedUrl.protocol === 'http:' && parsedUrl.port === '') {
|
||||||
port = 80;
|
port = 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return port;
|
return port;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user