How would you enable Cross-Origin Resource Sharing (CORS) in a Flask application?

  • CORS is enabled by default in Flask
  • Modify the browser's settings
  • Use the "@cross_origin" decorator
  • Use the Flask-CORS extension
You can enable CORS in Flask by using the Flask-CORS extension. The other options are not the recommended way to enable CORS in Flask.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *