dantezhu / flask_util_js

flask's util in javascript. such as url_for etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

flask_utils should use the request.script_root

santoshs opened this issue · comments

Currently, if the site is hosted in example.com/app/ then the URL generated by flask_util.url_for doesn't not include the /app/, rather the output is /<something>. Using request.script_root in the jinja templates gives the proper URL, i.e /app/, generation of the URL json object should use the script_root to get the correct URLs.

Has there been any solution to this? I'm now running into the same problem in my test environment behind nginx, but works fine on localhost.