File: generic.conf

package info (click to toggle)
kore 4.2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,912 kB
  • sloc: ansic: 29,227; makefile: 344; sh: 278; python: 149; cpp: 34
file content (81 lines) | stat: -rw-r--r-- 1,347 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# 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
	}
}