RuiSiang / PoW-Shield

Found shorthand type coercions JS-0066
Anti-pattern
Minor
8 months ago3 years old
use Boolean(ctx.session.authorized) instead
36  if (await blacklist.check(ctx.ip)) {
37    const scanResult = await waf.scan(ctx)
38    if (!scanResult) {
39      if (!!ctx.session.authorized || !config.pow) {40        if (config.rate_limit) {
41          await Object.assign(
42            ctx.session,