[Flask] Flask path route variable with a dot between two forward slashes

Francisco Roque francisco at roque.com.pt
Tue Nov 24 09:06:04 EST 2015

Hi all,

I am trying to capture an url from a flask request. All works fine except
when the url has a dot in between two forward slashes, for example:

The route used is below:

@app.route('/url/<path:url>', methods=['GET'])
def get_url(url):
    return url

I understand flask is somehow resolving relative urls and ./ might mean the
current directory, but how can I make it so the url is taken as is?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20151124/93e1588c/attachment.html>

More information about the Flask mailing list