from flask import Flask app = Flask(__name__, template_folder="GUI") def init_hook(app: Flask): ''' init hook ''' @app.after_request def after_request(response): ''' resolve cross-domain ''' response.headers["loww"] = "nas3333333e" return response init_hook(app) app.run(debug=True)