<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:lighttpd.net:lighttpd2/doc1">
	<short>loads quotes (aka fortune cookies) from a file and provides actions to add a random quote as response header (X-fortune) or display it as a page.</short>

	<setup name="fortune.load">
		<short>loads cookies from a file, can be called multiple times to load data from multiple files</short>
		<parameter name="filename">
			<short>the file to load the cookies from </short>
		</parameter>
	</setup>

	<action name="fortune.header">
		<short>adds a random quote as response header "X-fortune".</short>
	</action>

	<action name="fortune.page">
		<short>shows a random cookie as response text</short>
	</action>

	<example>
		<config>
			setup {
				module_load "mod_fortune";
				fortune.load "/var/www/fortunes.txt";
			}

			if req.path == "/fortune" {
				fortune.page;
			} else {
				fortune.header;
			}
		</config>
	</example>
</module>
