Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
litespeed_wiki:config:recaptcha [2019/09/23 14:25] Jackson Zhang [Advanced Configuration: Define reCAPTCHA Actions Through Rewrite Rules] |
litespeed_wiki:config:recaptcha [2020/05/20 20:25] (current) Shivam Saluja Remove space from RewriteRule |
||
---|---|---|---|
Line 52: | Line 52: | ||
{{:litespeed_wiki:config:recaptcha4.jpg|}} | {{:litespeed_wiki:config:recaptcha4.jpg|}} | ||
+ | |||
+ | |||
+ | ===== Set "Trusted <ip>" in .htaccess to bypass reCAPTCHA check ==== | ||
+ | |||
+ | Since LSWS 5.4RC1, LSWS added virtual host trusted IP support, where you use ''Trusted 1.2.3.4, 5.6.7.8'' for IPv4 or ''Trusted [2001:db8:85a3:8d3:1319:8a2e:370:7348]'' for IPv6 in Virtual Host document root .htaccess to bypass reCAPTCHA, it also unblock blocked IP and make that IP trusted for that vhost. | ||
Line 70: | Line 75: | ||
(''SOME-CONDITIONAL-CHECK'' would be a suspicious UA, IP address, etc.) | (''SOME-CONDITIONAL-CHECK'' would be a suspicious UA, IP address, etc.) | ||
- | The end user can even further define the reCAPTCHA action as ''deny'' or ''drop'' in .htaccess through ''[E=verifycaptcha: ACTION]'' | + | The end user can even further define the reCAPTCHA action as ''deny'' or ''drop'' in .htaccess through ''[E=verifycaptcha:ACTION]'' |
For example: | For example: | ||
Line 76: | Line 81: | ||
<IfModule LiteSpeed> | <IfModule LiteSpeed> | ||
RewriteCond SOME-CONDITIONAL-CHECK | RewriteCond SOME-CONDITIONAL-CHECK | ||
- | RewriteRule .* - [E=verifycaptcha: deny] | + | RewriteRule .* - [E=verifycaptcha:deny] |
</IfModule> | </IfModule> | ||
</code> | </code> | ||
Line 85: | Line 90: | ||
<IfModule LiteSpeed> | <IfModule LiteSpeed> | ||
RewriteCond SOME-CONDITIONAL-CHECK | RewriteCond SOME-CONDITIONAL-CHECK | ||
- | RewriteRule .* - [E=verifycaptcha: drop] | + | RewriteRule .* - [E=verifycaptcha:drop] |
</IfModule> | </IfModule> | ||
</code> | </code> |