embedding_webagg example: Download button does not work

If you ran the example (https://github.com/matplotlib/matplotlib/blob/master/examples/user_interfaces/embedding_webagg.py) the download button does not work.

(You can download the figure when you go to http://127.0.0.1:8080/download.png, it's just the button which does not work)

One related question: 
Is there any chance to integrate the webagg backend with flask? If yes, a full working example would be nice (maybe an example using any webframework for serving the html would be helpful).