2014-08-04 19:00:25 +02:00
|
|
|
# Placeholder configuration
|
|
|
|
|
2019-09-27 20:00:35 +02:00
|
|
|
server tls {
|
2019-09-27 12:22:35 +02:00
|
|
|
bind 127.0.0.1 8888
|
|
|
|
}
|
|
|
|
|
2014-08-04 19:00:25 +02:00
|
|
|
load ./parameters.so
|
|
|
|
|
2015-05-06 10:59:43 +02:00
|
|
|
tls_dhparam dh2048.pem
|
2015-02-06 09:02:29 +01:00
|
|
|
|
2014-08-04 19:00:25 +02:00
|
|
|
# The validator used to validate the 'id' parameter
|
|
|
|
# defined below. We'll use a simple regex to make sure
|
|
|
|
# it only matches positive numbers.
|
|
|
|
validator v_id regex ^[0-9]*$
|
|
|
|
|
2017-09-19 15:16:02 +02:00
|
|
|
domain * {
|
2019-09-27 12:22:35 +02:00
|
|
|
attach tls
|
|
|
|
|
2017-02-26 02:02:39 +01:00
|
|
|
certfile cert/server.pem
|
|
|
|
certkey cert/key.pem
|
2014-08-04 19:00:25 +02:00
|
|
|
|
2019-11-15 08:11:02 +01:00
|
|
|
route / page
|
2014-08-04 19:00:25 +02:00
|
|
|
|
|
|
|
# The parameters allowed for "/" (GET method).
|
2014-08-04 19:02:23 +02:00
|
|
|
#
|
|
|
|
# If you would want to declare parameters available
|
|
|
|
# to the page handler for POST, swap the 'get' setting
|
|
|
|
# to 'post' instead, Kore takes care of the rest.
|
2018-01-16 18:47:50 +01:00
|
|
|
params qs:get / {
|
2014-08-04 19:00:25 +02:00
|
|
|
# Validate the id parameter with the v_id validator.
|
|
|
|
validate id v_id
|
|
|
|
}
|
|
|
|
}
|