mirror of
https://github.com/simon987/ngx_http_js_challenge_module.git
synced 2025-04-10 14:06:46 +00:00
Increased whitelist to 1024 entries. Bound checking on loading. Updated README with new config
This commit is contained in:
parent
2a2e4b7f15
commit
c05d000c00
@ -37,6 +37,7 @@ server {
|
||||
js_challenge_html /path/to/body.html;
|
||||
js_challenge_bucket_duration 3600;
|
||||
js_challenge_title "Verifying your browser...";
|
||||
js_challenge_whitelist /path/to/whitelist/file.conf;
|
||||
|
||||
location /static {
|
||||
js_challenge off;
|
||||
@ -57,6 +58,7 @@ server {
|
||||
* `js_challenge_html "/path/to/file.html"` Path to html file to be inserted in the `<body>` tag of the interstitial page
|
||||
* `js_challenge_title "title"` Will be inserted in the `<title>` tag of the interstitial page. DEFAULT: "Verifying your browser..."
|
||||
* `js_challenge_bucket_duration time` Interval to prompt js challenge, in seconds. DEFAULT: 3600
|
||||
* `js_challenge_whitelist "/path/to/whitelist/file.conf"` Path to conf file containing whitelisted hosts and networks
|
||||
|
||||
### Installation
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
#define DEFAULT_TITLE "Verifying your browser..."
|
||||
|
||||
#define WHITELIST_MAX_LENGTH 256
|
||||
#define WHITELIST_MAX_LENGTH 1024
|
||||
|
||||
|
||||
typedef struct {
|
||||
@ -219,7 +219,7 @@ static size_t load_whitelist( const char* file, network_info_t* list, size_t max
|
||||
}
|
||||
|
||||
|
||||
} while ((token = strtok(NULL, ";")) != NULL);
|
||||
} while (len < WHITELIST_MAX_LENGTH && ((token = strtok(NULL, ";")) != NULL));
|
||||
}
|
||||
|
||||
free(linebuf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user