mirror of
https://github.com/democratic-csi/democratic-csi.git
synced 2026-10-05 00:34:17 +02:00
defaults for freenas protocol
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
This commit is contained in:
@@ -14,6 +14,20 @@ class Client {
|
||||
}
|
||||
getBaseURL() {
|
||||
const server = this.options;
|
||||
if (!server.protocol) {
|
||||
if (server.port) {
|
||||
if (String(server.port).includes("80")) {
|
||||
server.protocol = "http";
|
||||
}
|
||||
if (String(server.port).includes("443")) {
|
||||
server.protocol = "https";
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!server.protocol) {
|
||||
server.protocol = "http";
|
||||
}
|
||||
|
||||
const options = {
|
||||
scheme: server.protocol,
|
||||
host: server.host,
|
||||
|
||||
Reference in New Issue
Block a user