/nginx-dynamic-etags

Nginx C module to handling ETag / If-None-Match on proxied content.

Primary LanguageC

Name

nginx-dynamic-etags - Nginx C module to handling ETag / If-None-Match on proxied content.

Status

This module is production ready.

Synopsis

http {
    map $request_uri $etag {
        default "off";

        /api/foo "on";
        /api/bar "on";
    }

    server {
        listen 80;

        location ~ ^/api/.* {
            dynamic_etags $etag;

            proxy_http_version 1.1;
            proxy_set_header Connection "";

            proxy_pass http://127.0.0.1:8080;
        }
    }
}

Installation

  1. Grab the nginx source code from nginx.org.
  2. and finally build the source with this module:
./configure ... \
    --add-module=/path/to/nginx-dynamic-etags

make -j2
make install

About

This module meets the needs of the kali/nginx-dynamic-etags module, to implements nginx map to enable etag.