#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ # @Version : Python 3.11.4 # @Software : Sublime Text 4 # @Author : StudentCWZ # @Email : StudentCWZ@outlook.com # @Date : 2023/11/4 15:43 # @File : init_cors.py # @Description : Initializes the Flask CORS extension for a Flask application. """ from flask import Flask from flask_cors import CORS def init_cors(app: Flask) -> None: """ Initializes the Flask CORS extension for a Flask application. The CORS extension allows for cross-origin resource sharing, enabling requests from different domains to the Flask application. Args: app (Flask): The Flask application. Returns: None """ CORS(app)