diff --git a/proxy.js b/proxy.js index 14efcfc..5cba14a 100644 --- a/proxy.js +++ b/proxy.js @@ -26,7 +26,7 @@ const params = { certFile ? serveTls(handle, params) : serve(handle, params) const authString = auth ? Deno.readTextFileSync(auth) : '' -const users = authString.match(/^(\w|:)+/gm) +const users = authString.match(/^(\w|:)+/gm) || [] if(auth) { certFile || console.warn('[Warning] pass basic authorization in HTTP is unsafely, please consider use HTTPS') console.info(`load ${users.length} valid user`)