I have a catch-all route set up in Flask and I want to parse the URL regardless of the length.
from flask import Flask
app = Flask(__name__)
app.route('/')
app.route('/<path:path>')
def main(path=None):
if path == None:
return 'foo'
else:
return 'bar'
if __name__ == '__main__':
app.run()
The problem is I'm getting a 404 Not Found error and I don't know why. The url I'm using to test is /hello/world/. Thanks in advance.