lua-counter example

Artifact [b630972664]
anonymous

Artifact [b630972664]

Artifact b630972664292721c2ef23bc900570338b151cae3b6f227517b19527908ddc82:


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';
	expires epoch;
	keepalive_timeout 0;
}