diff options
author | Frederick Muriuki Muriithi | 2021-10-19 10:35:32 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2021-10-19 10:35:32 +0300 |
commit | d603df2b7a50167319c8e26e101e29cef55b3a7a (patch) | |
tree | e1b3c6a22a47834a50d6eaaf70544b4dce4a335e /gn3/app.py | |
parent | efb9896464f969de4fe8fcaee21a19ac1d881fa2 (diff) | |
parent | 546b37e77c11c5268aa9510b9756f2ed4d60241d (diff) | |
download | genenetwork3-d603df2b7a50167319c8e26e101e29cef55b3a7a.tar.gz |
Merge branch 'main' of github.com:genenetwork/genenetwork3 into partial-correlations
Diffstat (limited to 'gn3/app.py')
-rw-r--r-- | gn3/app.py | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -21,12 +21,6 @@ def create_app(config: Union[Dict, str, None] = None) -> Flask: # Load default configuration app.config.from_object("gn3.settings") - CORS( - app, - origins=app.config["CORS_ORIGINS"], - allow_headers=app.config["CORS_HEADERS"], - supports_credentials=True, intercept_exceptions=False) - # Load environment configuration if "GN3_CONF" in os.environ: app.config.from_envvar('GN3_CONF') @@ -37,6 +31,13 @@ def create_app(config: Union[Dict, str, None] = None) -> Flask: app.config.update(config) elif config.endswith(".py"): app.config.from_pyfile(config) + + CORS( + app, + origins=app.config["CORS_ORIGINS"], + allow_headers=app.config["CORS_HEADERS"], + supports_credentials=True, intercept_exceptions=False) + app.register_blueprint(general, url_prefix="/api/") app.register_blueprint(gemma, url_prefix="/api/gemma") app.register_blueprint(rqtl, url_prefix="/api/rqtl") |