liquid_feedback_frontend
changeset 1670:fa82e72afdfe
Provide base url without trailing slash
author | bsw |
---|---|
date | Fri Apr 23 13:55:17 2021 +0200 (2021-04-23) |
parents | 09f275c1f606 |
children | 3c08ec19cc2b |
files | app/main/api/application.lua |
line diff
1.1 --- a/app/main/api/application.lua Thu Apr 22 14:25:42 2021 +0200 1.2 +++ b/app/main/api/application.lua Fri Apr 23 13:55:17 2021 +0200 1.3 @@ -4,10 +4,16 @@ 1.4 1.5 local system_applications = SystemApplication:get_all() 1.6 1.7 +local base_url = request.get_absolute_baseurl() 1.8 + 1.9 +if string.sub(base_url, -1, -1) == "/" then 1.10 + base_url = string.sub(base_url, 1, -2) 1.11 +end 1.12 + 1.13 r[#r+1] = json.object{ 1.14 type = "system", 1.15 name = "LiquidFeedback", 1.16 - base_url = request.get_absolute_baseurl(), 1.17 + base_url = base_url, 1.18 manifest_url = request.get_absolute_baseurl() .. "api/1/info", 1.19 cert_common_name = config.oauth2.cert_common_name 1.20 }