snappass
snappass copied to clipboard
URL_PREFIX is ignored
~# grep -ri URL_PREFIX /usr/local/lib/python3.7/dist-packages/snappass
~# grep navbar-brand /usr/local/lib/python3.7/dist-packages/snappass/templates/base.html
<a class="navbar-brand" href="/">Share Secret</a>
href pointing to / regardless of URL_PREFIX setting
It was introduced in #106:
https://github.com/pinterest/snappass/blob/8a3a7f7c396b2b7579f571242a56d62f440634d2/snappass/main.py#L169-L170
... and it looks like it hasn't made it into an officially-tagged release yet.
The URL_PREFIX is only used on the link for the URL. It is never used or implemented to used as subfolder. If you want to do this, you need to set it on every (in my case /snappass is my subfolder) @app.route('/snappass/', methods=['GET'])
dont forget to change the app, because the static also need to use the subfolder app = Flask(name, '/snappass/static/')