diff options
author | zsloan | 2021-11-11 11:23:39 -0600 |
---|---|---|
committer | GitHub | 2021-11-11 11:23:39 -0600 |
commit | 8c77af63efae6f06d7c7c3269fc0e41811a8037a (patch) | |
tree | 9ffa4b84fd36f09e772db3e218bc980999324c41 /gn3/app.py | |
parent | 607c6e627c23c1bce3b199b145855182ab51b211 (diff) | |
parent | 249b85102063debfeeb1b0565956059b8a3af1cf (diff) | |
download | genenetwork3-8c77af63efae6f06d7c7c3269fc0e41811a8037a.tar.gz |
Merge branch 'main' into feature/add_rqtl_pairscan
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") |