Merge branch 'kyber-master-feat-cors'

This commit is contained in:
vrde 2017-05-12 15:33:47 +02:00
commit 6cb75960b0
No known key found for this signature in database
GPG Key ID: 6581C7C39B3D397D
2 changed files with 17 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import copy
import multiprocessing
from flask import Flask
from flask_cors import CORS
import gunicorn.app.base
from bigchaindb import utils
@ -60,6 +61,21 @@ def create_app(*, debug=False, threads=4):
app = Flask(__name__)
CORS(app,
headers=(
'x-requested-with',
'content-type',
'accept',
'origin',
'authorization',
'x-csrftoken',
'withcredentials',
'cache-control',
'cookie',
'session-id',
),
supports_credentials=True)
app.debug = debug
app.config['bigchain_pool'] = utils.pool(Bigchain, size=threads)

View File

@ -71,6 +71,7 @@ install_requires = [
'python-rapidjson==0.0.11',
'logstats>=0.2.1',
'flask>=0.10.1',
'flask-cors~=2.1.2',
'flask-restful~=0.3.0',
'requests~=2.9',
'gunicorn~=19.0',