Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
litespeed_wiki:config:recaptcha [2019/01/14 16:56]
Lisa Clarke Copywriting
litespeed_wiki:config:recaptcha [2019/03/05 21:18]
Kevin Fwu [Rewrite Rule]
Line 17: Line 17:
  
  
-For demonstration purposes, we will set **Trigger Sensitivity** to maximum (''​100''​), ​abd **reCAPTCHA Type** to ''​Checkbox''​. You  may adjust these values according to your needs. Save and restart LSWS.+For demonstration purposes, we will set **Trigger Sensitivity** to maximum (''​100''​), ​and **reCAPTCHA Type** to ''​Checkbox''​. You  may adjust these values according to your needs. Save and restart LSWS.
  
 {{:​litespeed_wiki:​config:​recaptcha2.jpg|}} {{:​litespeed_wiki:​config:​recaptcha2.jpg|}}
Line 40: Line 40:
 Use one of the following rewrite rule directives: Use one of the following rewrite rule directives:
  
-''​[E=verifycaptcha]''​ or ''​[E=verifycaptcha: ​deny]''​+''​[E=verifycaptcha]''​ or ''​[E=verifycaptcha: ​ACTION]''​
  
-''​[E=verifycaptcha]''​ will always redirect to reCAPTCHA until verified. ''​[E=verifycaptcha: ​deny]'' ​will redirect ​to reCAPTCHA until **Max Tries** is reached, ​after which the client will be denied.+''​[E=verifycaptcha]''​ will always redirect to reCAPTCHA until verified. ''​ACTION''​ can be ''​deny''​ to return a 403 or ''​drop''​ to drop the connection when **Max Tries** ​is reached. Until Max Tries is reached, the client will be redirected to recaptcha.
  
 For example: For example:
Line 59: Line 59:
  
 {{:​litespeed_wiki:​config:​recaptcha4.jpg|}} {{:​litespeed_wiki:​config:​recaptcha4.jpg|}}
 +
 +===== Customizing the Good Bots List =====
 +
 +Google bots are considered good bots because they help index your site. However, they cannot do their job properly without receiving the correct page. The Bot Whitelist configuration may be used to specify bots that you may need for your site.
 +
 +{{:​litespeed_wiki:​config:​recaptcha5.png|}}
 +
 +Here, we have configured '​Edge'​ in the Bot Whitelist text area. Bot Whitelist is a '​contains'​ match, but regex may be used as well.
 +
 +After restarting, browsers containing Edge in the user-agent header will bypass recaptcha:
 +
 +{{ :​litespeed_wiki:​config:​recaptcha6.png?​800 |The browser on the left is Microsoft Edge, the browser on the right is Chrome.}}
 +
 +The Allowed Bot Hits configuration may be used to limit how many times a good bot (including Googlebot) is allowed to hit a URL before it is redirected to recaptcha as well. This may be useful to prevent bad actors from bypassing recaptcha using a custom user agent.
 +
 +===== Customizing the Recaptcha Page =====
 +
 +The default recaptcha page is generic. If you would like to customize the page, you may do so by creating a file at ''​$SERVER_ROOT/​lsrecaptcha/​_recaptcha_custom.shtml''​.
 +
 +There are two script tags that are required and it is strongly recommended to avoid changing the form and the recaptchadiv unless you know what you are doing. There are three echos within the page itself. Those are used by the web server to customize the recaptcha type and keys and specify any query string used.
 +
 +Beyond those required attributes, everything else is customizable. As noted before, please ensure that you have backups of the default page and your customized page. Note that the ''​.shtml''​ extension is required in order to use the LSWS configured type and keys.
  • Admin
  • Last modified: 2020/05/20 20:25
  • by Shivam Saluja