Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (25 sloc) 874 Bytes
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = 'dongsamb'
from flask import Flask
from flask_restful import Api
from logdigRestful import LogdigRestful
# flask settings
application = Flask(__name__)
api = Api(application)
api.add_resource(LogdigRestful, '/')
def after_request(response):
"""solve CORS issue (
:param response: response, after request
:return: header added response
response.headers.add('Access-Control-Allow-Origin', '*')
'Access-Control-Allow-Headers', 'Content-Type,Authorization')
response.headers.add('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE')
return response
if __name__ == '__main__':
# start server
application.debug = True
You can’t perform that action at this time.