Update CORS
This change makes use of a decorator from the flask snippet section.
It works better.