# Placeholder configuration

server tls {
	bind 127.0.0.1 8888
}

load		./generic.so		example_load

http_body_max			1024000000
http_body_disk_offload		1024000

validator	v_example	function	v_example_func
validator	v_regex		regex		^/test/[a-z]*$
validator	v_number	regex		^[0-9]*$
validator	v_session	function	v_session_validate

authentication auth_example {
	authentication_type		cookie
	authentication_value		session_id
	authentication_validator	v_session
	authentication_uri		/private
}

domain * {
	attach		tls

	certfile	cert/server.pem
	certkey		cert/key.pem
	accesslog	kore_access.log

	route /css/style.css {
		handler asset_serve_style_css
		methods get
	}

	route / {
		handler asset_serve_index_html
		methods get
	}

	route /intro.jpg {
		handler asset_serve_intro_jpg
		methods get
	}

	route /b64test {
		handler serve_b64test
		methods get
	}

	route /upload {
		handler serve_file_upload
		methods get post
	}

	route /validator {
		handler serve_validator
		methods get
	}

	route /params-test {
		handler serve_params_test
		methods get post

		validate qs:get arg1 v_example
		validate qs:get id v_number

		validate post test1 v_example
		validate post test2 v_regex
	}

	route /private {
		handler serve_private
		methods get
	}

	route /private/test {
		handler asset_serve_private_test_html
		authenticate auth_example
	}
}
