mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-15 18:07:05 +08:00
fix: 解决容器创建端口选择 ipv6 校验问题 (#1695)
This commit is contained in:
parent
22fe2a6d51
commit
efebb26b5e
1 changed files with 2 additions and 2 deletions
|
@ -439,12 +439,12 @@ const checkPortValid = () => {
|
||||||
}
|
}
|
||||||
for (const port of dialogData.value.rowData!.exposedPorts) {
|
for (const port of dialogData.value.rowData!.exposedPorts) {
|
||||||
if (port.host.indexOf(':') !== -1) {
|
if (port.host.indexOf(':') !== -1) {
|
||||||
port.hostIP = port.host.split(':')[0];
|
port.hostIP = port.host.substring(0, port.host.lastIndexOf(':'));
|
||||||
if (checkIpV4V6(port.hostIP)) {
|
if (checkIpV4V6(port.hostIP)) {
|
||||||
MsgError(i18n.global.t('firewall.addressFormatError'));
|
MsgError(i18n.global.t('firewall.addressFormatError'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
port.hostPort = port.host.split(':')[1];
|
port.hostPort = port.host.substring(port.host.lastIndexOf(':') + 1);
|
||||||
} else {
|
} else {
|
||||||
port.hostPort = port.host;
|
port.hostPort = port.host;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue