Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update stac_api_url and raster_api_url properties to check correct variables #431

Merged
merged 5 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions ingest_api/infrastructure/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,3 @@ def env(self) -> aws_cdk.Environment:
account=self.aws_account,
region=self.aws_region,
)

@property
def veda_stac_api_cf_url(self) -> str:
"""inferred cloudfront url of the stac api if app is configured with a custom host and root path"""
if self.custom_host and self.stac_root_path:
return f"https://{self.custom_host}{self.stac_root_path}"
return self.stac_api_url

@property
def veda_raster_api_cf_url(self) -> str:
"""inferred cloudfront url of the raster api if app is configured with a custom host and root path"""
if self.custom_host and self.stac_root_path:
return f"https://{self.custom_host}{self.raster_root_path}"
return self.raster_api_url
8 changes: 4 additions & 4 deletions ingest_api/infrastructure/construct.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ def __init__(
"DYNAMODB_TABLE": self.table.table_name,
"JWKS_URL": self.jwks_url,
"NO_PYDANTIC_SSM_SETTINGS": "1",
"STAC_URL": config.veda_stac_api_cf_url,
"STAC_URL": config.stac_api_url,
"USERPOOL_ID": config.userpool_id,
"CLIENT_ID": config.client_id,
"CLIENT_SECRET": config.client_secret,
"RASTER_URL": config.veda_raster_api_cf_url,
"RASTER_URL": config.raster_api_url,
"ROOT_PATH": config.ingest_root_path,
"STAGE": config.stage,
"COGNITO_DOMAIN": config.cognito_domain,
Expand Down Expand Up @@ -256,11 +256,11 @@ def __init__(
lambda_env = {
"DYNAMODB_TABLE": table.table_name,
"NO_PYDANTIC_SSM_SETTINGS": "1",
"STAC_URL": config.veda_stac_api_cf_url,
"STAC_URL": config.stac_api_url,
"USERPOOL_ID": config.userpool_id,
"CLIENT_ID": config.client_id,
"CLIENT_SECRET": config.client_secret,
"RASTER_URL": config.veda_raster_api_cf_url,
"RASTER_URL": config.raster_api_url,
}

if config.raster_data_access_role_arn:
Expand Down