# HG changeset patch # User bsw # Date 1619178917 -7200 # Node ID fa82e72afdfea5d8ce4f857d730fa4cb69f831f9 # Parent 09f275c1f60602df8d4a96b5b955bfaeb1c85a3d Provide base url without trailing slash diff -r 09f275c1f606 -r fa82e72afdfe app/main/api/application.lua --- a/app/main/api/application.lua Thu Apr 22 14:25:42 2021 +0200 +++ b/app/main/api/application.lua Fri Apr 23 13:55:17 2021 +0200 @@ -4,10 +4,16 @@ local system_applications = SystemApplication:get_all() +local base_url = request.get_absolute_baseurl() + +if string.sub(base_url, -1, -1) == "/" then + base_url = string.sub(base_url, 1, -2) +end + r[#r+1] = json.object{ type = "system", name = "LiquidFeedback", - base_url = request.get_absolute_baseurl(), + base_url = base_url, manifest_url = request.get_absolute_baseurl() .. "api/1/info", cert_common_name = config.oauth2.cert_common_name }