lua-counter example

Diff
anonymous

Diff

Differences From Artifact [b630972664]:

To Artifact [5f43526cce]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19


20
21
22
1
2
3
4
5
6





7
8
9
10
11
12
13

14
15
16

17






-
-
-
-
-







-
+
+

-

location = /postgres {
	internal;
	postgres_query $echo_request_body;
	postgres_pass counter;
}

location = /sleep {
	internal;
	echo_sleep 1;
}

location = /counter {
	default_type application/json;
	userid on;
	userid_name uid;
	userid_expires 365d;
	userid_p3p 'policyref="/w3c/p3p.xml", CP="NOI CUR ADM PSA OUR STP STA"';

	content_by_lua_file '/path/to/counter.lua';
	content_by_lua_file '/home/arcade/work/admin/nginx/counter.content.lua';
	#log_by_lua_file '/home/arcade/work/admin/nginx/counter.log.lua';
	expires epoch;
	keepalive_timeout 0;
}