Edit button redirects to wrong link
basketshoe opened this issue · comments
Description
When pressing the edit button in a page it redirect to a non-existing wrong link
Steps to reproduce
- Go to any link in hedgedoc md
- Click the pencil button
- You'll be redirected to
https://example/edit
instead ofhttps://hedgedoc.domain.com/example/edit
Expected behaviour
Should redirect to https://hedgedoc.domain.com/example/edit
Logs
No response
Config
No response
Your Setup
I'm using hedgedoc.devol.it
as a user, I do not host it on my end so I do not have access to it
Additional context
No response
Hi @basketshoe,
I just verified the behaviour on demo.hedgedoc.org and could not reproduce it.
Then I checked out your instance (hedgedoc.devol.it) and immediately saw the problem. Your instance administrator has configured the base URL path to /
, which results in double slashes being inserted into URLs and thus breaking stuff. If no subpath is required, it should be an empty string instead.
Please tell your instance administrator to do one of the following things (depends on how they configured the HedgeDoc instance):
- unset the
CMD_URL_PATH
environment variable - set
urlPath
to an empty string in theconfig.json
For verification, compare the second line (window.urlpath
) in the /config endpoint:
- https://demo.hedgedoc.org/config (this is an empty string, so right)
- https://hedgedoc.devol.it/config (this is '/', wrong)
As this is nothing, we can change as the HedgeDoc team, I'm closing this issue.
Thank you 😄