Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rekgrpth/ngx_http_captcha_module
nginx module for generate captcha and validate captcha code
https://github.com/rekgrpth/ngx_http_captcha_module
c captcha nginx
Last synced: about 1 month ago
JSON representation
nginx module for generate captcha and validate captcha code
- Host: GitHub
- URL: https://github.com/rekgrpth/ngx_http_captcha_module
- Owner: RekGRpth
- License: mit
- Created: 2018-11-19T04:09:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-06T19:12:50.000Z (2 months ago)
- Last Synced: 2024-11-06T20:24:16.134Z (2 months ago)
- Topics: c, captcha, nginx
- Language: C
- Homepage:
- Size: 88.9 KB
- Stars: 9
- Watchers: 2
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Module:
### Example Configuration:
```nginx
location =/captcha {
captcha;
}
location =/login {
set_form_input $csrf_form csrf;
set_unescape_uri $csrf_unescape $csrf_form;
set_form_input $captcha_form captcha;
set_unescape_uri $captcha_unescape $captcha_form;
set_md5 $captcha_md5 "secret${captcha_unescape}${csrf_unescape}";
if ($captcha_md5 != $cookie_captcha) {
# captcha invalid code
}
}
```
### Directives:Syntax: captcha;
Default: ——
Context: locationEnables generation of captcha image.
Syntax: captcha_case on | off;
Default: off
Context: http, server, locationEnables/disables ignoring captcha case.
Syntax: captcha_expire seconds;
Default: 3600
Context: http, server, locationSets seconds before expiring captcha.
Syntax: captcha_height pixels;
Default: 30
Context: http, server, locationSets height of captcha image.
Syntax: captcha_length characters;
Default: 4
Context: http, server, locationSets length of captcha text.
Syntax: captcha_size pixels;
Default: 20
Context: http, server, locationSets size of captcha font.
Syntax: captcha_width pixels;
Default: 130
Context: http, server, locationSets width of captcha image.
Syntax: captcha_charset string;
Default: abcdefghkmnprstuvwxyzABCDEFGHKMNPRSTUVWXYZ23456789
Context: http, server, locationSets characters used in captcha text.
Syntax: captcha_csrf string;
Default: csrf
Context: http, server, locationSets name of csrf var of captcha.
Syntax: captcha_font string;
Default: /usr/share/fonts/ttf-liberation/LiberationSans-Regular.ttf
Context: http, server, locationSets font of captcha text.
Syntax: captcha_name string;
Default: Captcha
Context: http, server, locationSets name of captcha cookie.
Syntax: captcha_secret string;
Default: secret
Context: http, server, locationSets secret of captcha.