smr/conf/smr.conf

73 lines
1.5 KiB
Plaintext
Raw Normal View History

2020-05-16 01:10:11 +02:00
# smr configuration
server tls {
bind 0.0.0.0 8888
}
seccomp_tracing yes
load ./smr.so
root kore_chroot
runas root
#keymgr_runas demo
#keymgr_root ./
workers 1
http_body_max 8388608
tls_dhparam dh2048.pem
validator v_any regex .*
validator v_storyid regex [a-zA-Z0-9]+
validator v_subdomain regex [a-z0-9]{1,30}
validator v_markup regex (plain|imageboard)
domain * {
attach tls
certfile server.pem
certkey key.pem
#I run kore behind a lighttpd reverse proxy, so this is a bit useless to me
accesslog /dev/null
2020-05-16 01:10:11 +02:00
route / home
route /_css/style.css asset_serve_style_css
route /_css/milligram.css asset_serve_milligram_css
route /_css/milligram.min.css.map asset_serve_milligram_min_css_map
route /favicon.ico asset_serve_favicon_ico
route /_paste post_story
route /_edit edit_story
route /_bio edit_bio
route /_login login
route /_claim claim
# Leading ^ is needed for dynamic routes, kore says the route is dynamic if it does not start with '/'
route ^/[^_].* read_story
params get /_edit {
validate story v_storyid
}
params post /_edit {
validate title v_any
validate story v_storyid
validate text v_any
validate pasteas v_subdomain
validate markup v_markup
}
params post /_paste {
validate title v_any
validate text v_any
validate pasteas v_subdomain
validate markup v_markup
}
#params get /[^_].* {
#validate story v_storyid
#}
params post /_login {
validate user v_subdomain
validate pass v_any
}
params post /_claim {
validate user v_any
}
}