Created
November 18, 2019 07:48
-
-
Save liuliqiang/57fa41d1fb0d55647313d1e10f87af6c to your computer and use it in GitHub Desktop.
fuck you
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from flask import Flask, jsonify | |
app = Flask(__name__) | |
# 跨域支持 | |
def after_request(resp): | |
resp.headers['Access-Control-Allow-Origin'] = '*' | |
return resp | |
app.after_request(after_request) | |
@app.route("/code/check") | |
def index(): | |
return jsonify({"result":True,"message":"牛逼了!"}) | |
# app.run(port=443, debug=True) | |
app.run(port=443, debug=True,ssl_context='adhoc') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment