1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-19 21:39:40 +02:00
portainer/app/react/common/network-utils.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
197 B
TypeScript
Raw Normal View History

export function getSchemeFromPort(port?: number): 'http' | 'https' {
if (!port) {
return 'http';
}
const hostPort = String(port);
return hostPort.endsWith('443') ? 'https' : 'http';
}