mirror of https://github.com/portainer/portainer
9 lines
197 B
TypeScript
9 lines
197 B
TypeScript
![]() |
export function getSchemeFromPort(port?: number): 'http' | 'https' {
|
||
|
if (!port) {
|
||
|
return 'http';
|
||
|
}
|
||
|
|
||
|
const hostPort = String(port);
|
||
|
return hostPort.endsWith('443') ? 'https' : 'http';
|
||
|
}
|