From da565b3bfc7525ca2029d115b31d120e926f365e Mon Sep 17 00:00:00 2001 From: Kyle Maas Date: Tue, 29 Nov 2022 04:22:30 -0500 Subject: [PATCH] Fix double slashes in URIs (#558) --- files/context_processors.py | 2 +- templates/config/installation/site.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/files/context_processors.py b/files/context_processors.py index 6abc8eb..96060d5 100644 --- a/files/context_processors.py +++ b/files/context_processors.py @@ -6,7 +6,7 @@ from .methods import is_mediacms_editor, is_mediacms_manager def stuff(request): """Pass settings to the frontend""" ret = {} - ret["FRONTEND_HOST"] = request.build_absolute_uri('/') + ret["FRONTEND_HOST"] = request.build_absolute_uri('/').rstrip('/') ret["DEFAULT_THEME"] = settings.DEFAULT_THEME ret["PORTAL_NAME"] = settings.PORTAL_NAME ret["PORTAL_DESCRIPTION"] = settings.PORTAL_DESCRIPTION diff --git a/templates/config/installation/site.html b/templates/config/installation/site.html index aa4d14f..80cbf8c 100644 --- a/templates/config/installation/site.html +++ b/templates/config/installation/site.html @@ -2,7 +2,7 @@ MediaCMS.site = { id: 'mediacms', title: "{{PORTAL_NAME}}", url: '{{FRONTEND_HOST}}', - api: '{{FRONTEND_HOST}}api/v1', + api: '{{FRONTEND_HOST}}/api/v1', theme: { mode: '{{DEFAULT_THEME}}', switch: {