mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
eaf7e10958
commit
3692b90314
1 file changed
+5
-6
@@ -27,9 +27,9 @@ import logger from "../../common/logger";
|
|||||||
|
|
||||||
export function portForwardAddress(portForward: ForwardedPort) {
|
export function portForwardAddress(portForward: ForwardedPort) {
|
||||||
return `${portForward.protocol ?? "http"}://localhost:${portForward.forwardPort}`;
|
return `${portForward.protocol ?? "http"}://localhost:${portForward.forwardPort}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function openPortForward(portForward: ForwardedPort) {
|
export function openPortForward(portForward: ForwardedPort) {
|
||||||
const browseTo = portForwardAddress(portForward);
|
const browseTo = portForwardAddress(portForward);
|
||||||
|
|
||||||
openExternal(browseTo)
|
openExternal(browseTo)
|
||||||
@@ -45,10 +45,9 @@ export function portForwardAddress(portForward: ForwardedPort) {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function predictProtocol(name: string) {
|
export function predictProtocol(name: string) {
|
||||||
return name === "https" ? "https" : "http";
|
return name === "https" ? "https" : "http";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user