Skip to content

tokers/ngx_http_print_module

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ngx_http_print_module

Simple Nginx module for producing HTTP response

Configuration

server {
    listen  10086;
    server_name localhost;
    
    location /t {
        print_flush on;
        print_sep "\t";
        print_ends "\r\n";
        print "Today" "is";
        print "Wednesday";
        print "I like";
        print "Nginx";

        print_duplicate 10 1000 "Hi" "It" "is a duplicate message.";
    }
}

Directives

print_sep

syntax: print_sep <separator>

phase: content

Set the separator between two messages.

print_ends

syntax: print_ends <ends>

phase: content

Set the end string after all the messages.

print_flush

syntax: print_flush on | off

phase: content

When this option is enable, messages will be flushed as soon as possible.

print

syntax: print <message1> <message2> ...

phase: content

Print some messages, you can specify any number of messages(larger or equal to 1). Note all the messages generated by this directive will be collected in one buffer, so the end string is only existed once after all messages.

print_duplicate

syntax: print_duplicate count interval <message1> <message2> ...

phase: content

Print some messages every interval time, count times total. you can specify any number of messages(larger or equal to 1).

TODO

  • Supports the NGINX variables.

About

Simple Nginx module for producing HTTP response

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published