mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: better handling of cors origins in backend
This commit is contained in:
parent
28d1863be0
commit
1f7ce3091b
1 changed files with 4 additions and 1 deletions
|
|
@ -48,7 +48,10 @@ def get_learnhouse_config() -> LearnHouseConfig:
|
|||
env_port = os.environ.get('LEARNHOUSE_PORT')
|
||||
env_ssl = os.environ.get('LEARNHOUSE_SSL')
|
||||
env_use_default_org = os.environ.get('LEARNHOUSE_USE_DEFAULT_ORG')
|
||||
env_allowed_origins = os.environ.get('LEARNHOUSE_ALLOWED_ORIGINS')
|
||||
env_allowed_origins = os.environ.get('LEARNHOUSE_ALLOWED_ORIGINS')
|
||||
# Allowed origins should be a comma separated string
|
||||
if env_allowed_origins:
|
||||
env_allowed_origins = env_allowed_origins.split(',')
|
||||
env_allowed_regexp = os.environ.get('LEARNHOUSE_ALLOWED_REGEXP')
|
||||
env_self_hosted = os.environ.get('LEARNHOUSE_SELF_HOSTED')
|
||||
env_host = os.environ.get('LEARNHOUSE_DB_HOST')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue