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.
Loading...
Related Quiz
- For serializing complex data types, like querysets and model instances, in Django Rest Framework, ____ is used.
- When installing Python packages globally, the tool most commonly used is _______.
- For an infinite loop using the while construct, the typical condition used is while _______:
- In Flask, the ____ function is used to render a template and send it to the client’s browser.
- Python's ____ allows classes to be created dynamically, at runtime.