scragg0x / realms-wiki

Git based wiki inspired by Gollum
http://realms.io
GNU General Public License v2.0
833 stars 90 forks source link

Fix wsgi relative script locations #122

Closed larsimmisch closed 7 years ago

larsimmisch commented 8 years ago

This fixes #120.

As far as I can make it out, my current usecase, i.e. running realms-wiki under wsgi with a relative script path, was not supported by realms. This pull request add support for this usecase (and requires no user configuration).

I made some changes that are a bit opinionated:

The current scheme is less ambiguous: RELATIVE_PATH is used elsewhere in the code and is not necessarily the same as URL_PREFIX and usages are closer to the naming in flask.

The downside: existing configurations have to be manually updated.

I'll rework the pull request if I hear objections to the renaming.

scragg0x commented 8 years ago

I thought it did work and remember testing it out, it's been awhile though. I probably did have nginx using a location directive though. I agree with your naming scheme although it might break some installs (I doubt many are using this though) I also see some references to RELATIVE_PATH on the javascript files, is that correct?

larsimmisch commented 7 years ago

I'll prepare a new PR