liquid_feedback_frontend
diff config/init.lua @ 1163:ee63ad6bb3e3
merge
author | jbe |
---|---|
date | Tue Mar 24 12:55:22 2015 +0100 (2015-03-24) |
parents | 385a1e369faf |
children | 93b32111526f |
line diff
1.1 --- a/config/init.lua Tue Mar 24 12:55:01 2015 +0100 1.2 +++ b/config/init.lua Tue Mar 24 12:55:22 2015 +0100 1.3 @@ -72,6 +72,13 @@ 1.4 -- compatibility for WebMCP 1.2.6 1.5 if not listen then 1.6 1.7 + WEBMCP_BASE_PATH = request.get_app_basepath() 1.8 + 1.9 + -- workaround bug in WebMCP 1.2.6 1.10 + if not string.find(WEBMCP_BASE_PATH, "/$") then 1.11 + WEBMCP_BASE_PATH = WEBMCP_BASE_PATH .. "/" 1.12 + end 1.13 + 1.14 -- open and set default database handle 1.15 _G.db = assert(mondelefant.connect(config.database)) 1.16 1.17 @@ -108,32 +115,4 @@ 1.18 request.add_header("Cache-Control", "max-age=3600"); 1.19 end 1.20 1.21 - return 1.22 -end 1.23 - 1.24 -if not config.fork then 1.25 - config.fork = {} 1.26 -end 1.27 - 1.28 -if not config.fork.pre then 1.29 - config.fork.pre = 4 1.30 -end 1.31 - 1.32 -if not config.fork.max then 1.33 - config.fork.max = 8 1.34 -end 1.35 - 1.36 -if not config.fork.delay then 1.37 - config.fork.delay = 1 1.38 -end 1.39 - 1.40 -if not config.port then 1.41 - config.port = 8080 1.42 -end 1.43 - 1.44 -listen{ 1.45 - { proto = "tcp4", port = config.port, localhost = true }, 1.46 - pre_fork = config.fork.pre, 1.47 - max_fork = config.fork.max, 1.48 - fork_delay = config.fork.delay 1.49 -} 1.50 +end 1.51 \ No newline at end of file