Skip to content

NGINX module to add a variable with the request start time

License

Notifications You must be signed in to change notification settings

gomlgs/nginx-request-start-time

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Building

The easiest way to build this module is using NGINX's build_module.sh script.

$ wget http://hg.nginx.org/pkg-oss/raw-file/default/build_module.sh
$ chmod +x build_module.sh
$ ./build_module.sh -y https://github.com/gomlgs/nginx-request-start-time.git

This produces a deb package that works with the mainline version of NGINX. See flags for build_module.sh for other options, including building for other NGINX versions. I'd recommend building this inside a container.

Docs

Usage

Load the module early in the NGINX config.

load_module /etc/nginx/modules/ngx_request_start_time_module.so;

This provides a new variable $request_start_usec that can be used in other configuration. An example:

  location / {
    proxy_set_header X-Request-Start $request_start_usec;
    
    proxy_pass http://some_server;
  }

About

NGINX module to add a variable with the request start time

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages