ignore spaces in network masks

Massimo Melina committed Oct 18, 2024 at 16:14 UTC ba82fd407081ff888243bc912d50c5ae83e08c72
1 file changed +1
src/misc.ts
+1
@@ -35,6 +35,7 @@ export function isLocalHost(c: Connection | Koa.Context | string) {
35 export function makeNetMatcher(mask: string, emptyMaskReturns=false) {
36 if (!mask)
37 return () => emptyMaskReturns
38 + mask = mask.replaceAll(' ','')
39 if (!mask.includes('/'))
40 return makeMatcher(mask)
41 const all = mask.split('|')