diff --git a/config/config.py b/config/config.py index 024728f3..4b5de8bd 100644 --- a/config/config.py +++ b/config/config.py @@ -128,9 +128,8 @@ def get_learnhouse_config() -> LearnHouseConfig: cookie_config = CookieConfig(domain=cookies_domain) env_content_delivery_type = os.environ.get("LEARNHOUSE_CONTENT_DELIVERY_TYPE") - content_delivery_type: str = ( - (yaml_config.get("hosting_config", {}).get("content_delivery", {}).get("type")) - or env_content_delivery_type + content_delivery_type: str = env_content_delivery_type or ( + (yaml_config.get("hosting_config", {}).get("content_delivery", {}).get("type")) or "filesystem" ) # default to filesystem diff --git a/config/config.yaml b/config/config.yaml index bf151243..0122a9db 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -11,9 +11,6 @@ security: hosting_config: domain: learnhouse.app ssl: true - allowed_origins: - - http://localhost:3000 - - http://localhost:3001 cookies_config: domain: ".localhost" allowed_regexp: '\b((?:https?://)[^\s/$.?#].[^\s]*)\b' diff --git a/src/services/utils/upload_content.py b/src/services/utils/upload_content.py index 81d766a2..0776fe94 100644 --- a/src/services/utils/upload_content.py +++ b/src/services/utils/upload_content.py @@ -30,6 +30,7 @@ async def upload_content( elif content_delivery == "s3api": # Upload to server then to s3 (AWS Keys are stored in environment variables and are loaded by boto3) # TODO: Improve implementation of this + print("Uploading to s3...") s3 = boto3.client( "s3", endpoint_url=learnhouse_config.hosting_config.content_delivery.s3api.endpoint_url,