mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Merge branch 'kyber-master-feat-cors'
This commit is contained in:
commit
6cb75960b0
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user