blog

The tiny blog platform powering https://blog.kore.io
Commits | Files | Refs | README | git clone https://git.kore.io/kore-blog.git

blog.conf (999B)



      1 # blog configuration
      2 
      3 server default {
      4 	bind 127.0.0.1 9988
      5 	tls no
      6 }
      7 
      8 workers		4
      9 runas		_blog
     10 chroot		/var/chroot/kore-blog
     11 
     12 validator v_any regex ^.*$
     13 validator v_referer function referer
     14 validator v_session function auth_session
     15 validator v_user function auth_user_exists
     16 
     17 authentication referer_log {
     18 	authentication_type		request
     19 	authentication_validator	v_referer
     20 }
     21 
     22 authentication author {
     23 	authentication_type		cookie
     24 	authentication_validator	v_session
     25 	authentication_value		blog_token
     26 	authentication_uri		/login/
     27 }
     28 
     29 domain * {
     30 	attach		default
     31 	accesslog	/var/log/kore/blog.log
     32 
     33 	static	/			post_list	referer_log
     34 	dynamic ^/posts/[a-z1-9\-]+$	post_render	referer_log
     35 
     36 	static	/drafts/		draft_list	author
     37 	dynamic ^/drafts/[a-z1-9\-]+$	draft_render	author
     38 
     39 	static	/logo.png		asset_serve_kore_png
     40 	static	/style.css		asset_serve_style_css
     41 
     42 	static	/login/			auth_login	referer_log
     43 
     44 	params post /login/ {
     45 		validate user v_user
     46 		validate passphrase v_any
     47 	}
     48 
     49 	dynamic ^.*$			redirect
     50 }