How to get current URL in jinja2/flask (request.url not working) July 25, 2023 by Tarik You can use {{ url_for(request.endpoint) }}, it works.