flask_test.py 326 B

1234567891011121314151617
  1. from flask import Flask
  2. app = Flask(__name__, template_folder="GUI")
  3. def init_hook(app: Flask):
  4. ''' init hook '''
  5. @app.after_request
  6. def after_request(response):
  7. ''' resolve cross-domain '''
  8. response.headers["loww"] = "nas3333333e"
  9. return response
  10. init_hook(app)
  11. app.run(debug=True)