mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-24 04:27:27 +08:00
feat: special ip address 'localhost' (#2935)
This commit is contained in:
+3
@@ -1,4 +1,7 @@
|
||||
export function isValidIPAddress(address: string) {
|
||||
if (address === 'localhost') {
|
||||
return true;
|
||||
}
|
||||
return /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(
|
||||
address
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user