Fix double slashes in URIs (#558)

This commit is contained in:
Kyle Maas 2022-11-29 04:22:30 -05:00 committed by GitHub
parent 239ff6cb60
commit da565b3bfc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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: {