-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
27 lines (22 loc) · 682 Bytes
/
main.py
File metadata and controls
27 lines (22 loc) · 682 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/env python
# -*- encoding:utf8 -*-
from flask import Flask
from flask.ext.cors import CORS
from api.slack import slack
from api.heartbeat import heartbeat
from api.drive import drive
from view.qrcode import qrcode
app = Flask(__name__)
app.register_blueprint(slack)
app.register_blueprint(heartbeat)
app.register_blueprint(drive)
app.register_blueprint(qrcode)
app.config['CORS_ALLOW_HEADERS'] = "Content-Type"
cors = CORS(app)
@app.after_request
def add_header(response):
response.headers['X-UA-Compatible'] = 'IE=Edge, chrome=1'
response.headers['Cache-Control'] = 'public, max-age=0'
return response
if __name__ == "__main__":
app.run(debug=True)