hedgedoc / hedgedoc

HedgeDoc - Ideas grow better together

Home Page:https://hedgedoc.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  1. Go to any link in hedgedoc md
  2. Click the pencil button
  3. You'll be redirected to https://example/edit instead of https://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 the config.json

For verification, compare the second line (window.urlpath) in the /config endpoint:

As this is nothing, we can change as the HedgeDoc team, I'm closing this issue.

Thank you 😄