shithub: werc

Download patch

ref: f72c551ee062c9dfedaa8223676a16209689453b
parent: f4b541e11e8d0df5218f46e86d7da3935e3915ee
author: sl <sl@stanleylieber.com>
date: Tue Jun 9 16:42:37 EDT 2020

bin/werc.rc: don't hardcode default header template. move it into werc_exec_request and use fn get_lib_file to prefer a site-specific headers.tpl, just like other .tpl files

--- a/bin/werc.rc
+++ b/bin/werc.rc
@@ -17,7 +17,6 @@
 # Careful, the proper p9p path might not be set until initrc.local is sourced
 path=(. /bin ./bin)
 
-headers=lib/headers.tpl
 res_tail='</body></html>'
 http_content_type='text/html'
 ll_add handlers_bar_left nav_tree
@@ -37,6 +36,7 @@
     site=$SERVER_NAME
     base_url=http://$site:$SERVER_PORT
     sitedir=$sitesdir/$site
+    headers=`{get_lib_file headers.tpl}
     master_template=`{get_lib_file default_master.tpl}
     current_date_time=`{date}