snappass icon indicating copy to clipboard operation
snappass copied to clipboard

URL_PREFIX is ignored

Open phaoost opened this issue 4 years ago • 3 comments

~# 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

phaoost avatar May 25 '20 19:05 phaoost

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.

jparise avatar May 26 '20 16:05 jparise

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/')

ucola avatar Jan 26 '21 13:01 ucola