Added explicit config values for `FRONTEND` and `BPMN` hostname and port.
Use these new values to define `CORS_ALLOW_ORIGINS` Removed unused `FRONTEND_AUTH_CALLBACK`
This commit is contained in:
parent
09a395fa34
commit
8d698cf275
|
@ -18,7 +18,9 @@ NAME = "CR Connect Workflow"
|
||||||
DEFAULT_PORT = "5000"
|
DEFAULT_PORT = "5000"
|
||||||
FLASK_PORT = environ.get('PORT0') or environ.get('FLASK_PORT', default=DEFAULT_PORT)
|
FLASK_PORT = environ.get('PORT0') or environ.get('FLASK_PORT', default=DEFAULT_PORT)
|
||||||
FRONTEND = "localhost:4200"
|
FRONTEND = "localhost:4200"
|
||||||
CORS_ALLOW_ORIGINS = re.split(r',\s*', environ.get('CORS_ALLOW_ORIGINS', default="localhost:4200, localhost:5002"))
|
BPMN = "localhost:5002"
|
||||||
|
CORS_DEFAULT = f'{FRONTEND}, {BPMN}'
|
||||||
|
CORS_ALLOW_ORIGINS = re.split(r',\s*', environ.get('CORS_ALLOW_ORIGINS', default=CORS_DEFAULT))
|
||||||
TESTING = environ.get('TESTING', default="false") == "true"
|
TESTING = environ.get('TESTING', default="false") == "true"
|
||||||
PRODUCTION = (environ.get('PRODUCTION', default="false") == "true")
|
PRODUCTION = (environ.get('PRODUCTION', default="false") == "true")
|
||||||
TEST_UID = environ.get('TEST_UID', default="dhf8r")
|
TEST_UID = environ.get('TEST_UID', default="dhf8r")
|
||||||
|
@ -51,7 +53,6 @@ SQLALCHEMY_DATABASE_URI = environ.get(
|
||||||
|
|
||||||
TOKEN_AUTH_TTL_HOURS = float(environ.get('TOKEN_AUTH_TTL_HOURS', default=24))
|
TOKEN_AUTH_TTL_HOURS = float(environ.get('TOKEN_AUTH_TTL_HOURS', default=24))
|
||||||
SECRET_KEY = environ.get('SECRET_KEY', default="Shhhh!!! This is secret! And better darn well not show up in prod.")
|
SECRET_KEY = environ.get('SECRET_KEY', default="Shhhh!!! This is secret! And better darn well not show up in prod.")
|
||||||
FRONTEND_AUTH_CALLBACK = environ.get('FRONTEND_AUTH_CALLBACK', default="http://localhost:4200/session")
|
|
||||||
SWAGGER_AUTH_KEY = environ.get('SWAGGER_AUTH_KEY', default="SWAGGER")
|
SWAGGER_AUTH_KEY = environ.get('SWAGGER_AUTH_KEY', default="SWAGGER")
|
||||||
# %s/%i placeholders expected for uva_id and study_id in various calls.
|
# %s/%i placeholders expected for uva_id and study_id in various calls.
|
||||||
PB_ENABLED = environ.get('PB_ENABLED', default="false") == "true"
|
PB_ENABLED = environ.get('PB_ENABLED', default="false") == "true"
|
||||||
|
|
Loading…
Reference in New Issue