mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 12:36:57 +00:00
fix "network" property in allowedPrivateNetworks
This commit is contained in:
parent
ebd4ccdd55
commit
e914be3694
1 changed files with 3 additions and 3 deletions
|
@ -154,7 +154,7 @@ type Source = {
|
|||
}
|
||||
};
|
||||
|
||||
export type PrivateNetworkSource = string | { ip?: string, ports?: number[] };
|
||||
export type PrivateNetworkSource = string | { network?: string, ports?: number[] };
|
||||
|
||||
export type PrivateNetwork = {
|
||||
/**
|
||||
|
@ -184,8 +184,8 @@ export function parsePrivateNetworks(patterns: PrivateNetworkSource[] | undefine
|
|||
if (cidr) {
|
||||
return { cidr } satisfies PrivateNetwork;
|
||||
}
|
||||
} else if (e.ip) {
|
||||
const cidr = parseIpOrMask(e.ip);
|
||||
} else if (e.network) {
|
||||
const cidr = parseIpOrMask(e.network);
|
||||
if (cidr) {
|
||||
return { cidr, ports: e.ports } satisfies PrivateNetwork;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue