Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
🐛 fix no user bug
Browse files Browse the repository at this point in the history
  • Loading branch information
skyyangyun committed Aug 18, 2022
1 parent 1fc1926 commit bf6e7da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`)
Expand Down

0 comments on commit bf6e7da

Please sign in to comment.