Update singlepageapplications.rst

This commit is contained in:
teaim 2022-06-16 15:48:45 +08:00 committed by GitHub
parent fe4003b3c9
commit b9abad28f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,6 +19,7 @@ The following example demonstrates how to serve an SPA along with an API::
@app.route('/', defaults={'path': ''}) @app.route('/', defaults={'path': ''})
@app.route('/<string:path>')
@app.route('/<path:path>') @app.route('/<path:path>')
def catch_all(path): def catch_all(path):
return app.send_static_file("index.html") return app.send_static_file("index.html")