kore/examples/generic/conf/generic.conf

52 lines
1.1 KiB
Plaintext

# 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 asset_serve_style_css
route / asset_serve_index_html
route /intro.jpg asset_serve_intro_jpg
route /b64test serve_b64test
route /upload serve_file_upload
route /validator serve_validator
route /params-test serve_params_test
route /private serve_private
route /private/test asset_serve_private_test_html auth_example
params post /params-test {
validate test1 v_example
validate test2 v_regex
}
params get /params-test {
validate arg1 v_example
validate id v_number
}
}