Skip to content

Commit

Permalink
Handle /api (remove it) urls when absolut-ize urls.
Browse files Browse the repository at this point in the history
  • Loading branch information
cekk committed Jan 17, 2024
1 parent a567c54 commit ec98d01
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 3 additions & 0 deletions src/redturtle/voltoplugin/editablefooter/restapi/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit ec98d01

Please sign in to comment.