From be72cc2229c8e827a15ddfe777dc990b37923423 Mon Sep 17 00:00:00 2001 From: Jennifer Tran <12633533+botanical@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:50:36 -0700 Subject: [PATCH] fix: update condition --- routes/infrastructure/config.py | 5 +++++ routes/infrastructure/construct.py | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/routes/infrastructure/config.py b/routes/infrastructure/config.py index e9d4f435..0d2a878a 100755 --- a/routes/infrastructure/config.py +++ b/routes/infrastructure/config.py @@ -48,6 +48,11 @@ class vedaRouteSettings(BaseSettings): None, description="Shared Web ACL ID ARN for CloudFront Distribution" ) + custom_host: str = Field( + None, + description="Complete url of custom host including subdomain. Used to infer url of stac-api before app synthesis.", + ) + class Config: """model config""" diff --git a/routes/infrastructure/construct.py b/routes/infrastructure/construct.py index 084350e1..b28afcd9 100755 --- a/routes/infrastructure/construct.py +++ b/routes/infrastructure/construct.py @@ -55,10 +55,9 @@ def __init__( description="Origin Access Control for STAC Browser", ), ) - if ( - stage == "production" - and veda_route_settings.domain_hosted_zone_name == "openveda.cloud" + veda_route_settings.domain_hosted_zone_name == veda_route_settings.custom_host + ): self.cf_domain_names = [ f"{stage}.{veda_route_settings.domain_hosted_zone_name}",