mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-12 02:25:41 +00:00
rename pow section in settings to captcha and add options to configure
suggested difficulty factors for use in CAPTCHA configurations estimates The current CAPTCHA configuration panel requires the user to provide difficulty factor <--> visitor threshold mapping, which can be tedious if the user isn't familiar with those parameters. Also, it could lead to ineffective limiting from mCaptcha's side, should it be configured improperly. So an estimate computed from well known statistics like peak, avg and broke-my-site traffic could go a long way.
This commit is contained in:
@@ -103,7 +103,7 @@ impl SystemGroup {
|
||||
|
||||
fn new_system<A: Save, B: MasterTrait>(m: Addr<B>, c: Addr<A>) -> System<A, B> {
|
||||
let pow = PoWConfigBuilder::default()
|
||||
.salt(SETTINGS.pow.salt.clone())
|
||||
.salt(SETTINGS.captcha.salt.clone())
|
||||
.build()
|
||||
.unwrap();
|
||||
|
||||
@@ -128,7 +128,7 @@ impl SystemGroup {
|
||||
SystemGroup::Redis(captcha)
|
||||
}
|
||||
None => {
|
||||
let master = EmbeddedMaster::new(SETTINGS.pow.gc).start();
|
||||
let master = EmbeddedMaster::new(SETTINGS.captcha.gc).start();
|
||||
let cache = HashCache::default().start();
|
||||
let captcha = Self::new_system(master, cache);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user