Source

ngx_zh_enhance /

Filename Size Date modified Message
700 B
482 B
12.4 KB

Usage

Usage is the combination of rewrite_if and rewrite_set.

zh_set_if (condition) $old $new;

Working example::

    default_type text/html;
    set $true 1;

    zh_set_if ($true) $atomd 'hello world';
    zh_set_if ($http_user_agent ~* 'iphone|android') $is_moblie 1;
    zh_set_if ($cookie_KEY) $is_cookie 1;

    echo $atomd;
    echo 'mobile:$is_moblie';
    echo 'cookie:$is_cookie';

Installation

./configure --add-module=/path/to/ngx_devel_kit --add-module=/path/to/ngx_http_zh_enhance_module