diff --git a/CHANGES.rst b/CHANGES.rst index b43ed6a..2387df8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,8 @@ Changelog 1.2.1 (unreleased) ------------------ -- Nothing changed yet. +- Handle /api (remove it) urls when absolut-ize urls. + [cekk] 1.2.0 (2024-01-17) diff --git a/src/redturtle/voltoplugin/editablefooter/restapi/get.py b/src/redturtle/voltoplugin/editablefooter/restapi/get.py index c7f9486..097a635 100644 --- a/src/redturtle/voltoplugin/editablefooter/restapi/get.py +++ b/src/redturtle/voltoplugin/editablefooter/restapi/get.py @@ -48,6 +48,9 @@ def reply(self): def get_portal_url(self): portal_url = api.portal.get().absolute_url() + # BBB + if portal_url.endswith("/api"): + portal_url = portal_url[:4] if not HAS_PLONE_VOLTO: return portal_url registry = getUtility(IRegistry)