http-js-challenge #

Simple javascript proof-of-work based access for Nginx with virtually no overhead.

Source: upstream source

Directives

js_challenge #

syntax: js_challenge on | off (on/off flag);  ·  context: server, location, server-if, location-if

Boolean directive — set to "on" or "off".

js_challenge_bucket_duration #

syntax: js_challenge_bucket_duration 1 arg (integer);  ·  context: server, location

DEFAULT: "Verifying your browser..." * js_challenge_bucket_duration time Interval to prompt js challenge, in seconds.

js_challenge_html #

syntax: js_challenge_html 1 arg (string);  ·  context: server, location

DEFAULT: "changeme" 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.

js_challenge_secret #

syntax: js_challenge_secret 1 arg (string);  ·  context: server, location

Stores a single string value.

js_challenge_title #

syntax: js_challenge_title 1 arg (string);  ·  context: server, location

DEFAULT: "changeme" 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.

Example

server {
    js_challenge on;
    js_challenge_secret "change me!";
    js_challenge_html /path/to/body.html;
    js_challenge_bucket_duration 3600;
    js_challenge_title "Verifying your browser...";

    location /static {
        js_challenge off;
        alias /static_files/;
    }

    location /sensitive {
        js_challenge_bucket_duration 600;
        #...
    }

    #...
}

↑ back to index