Skip to content

Commit e4db208

Browse files
authored
Merge pull request #1178 from xcube-dev/konstntokas-xxx-adjust_endpoint_stac_catalog
Fix endpoint url in STAC item's asset published by xcube server
2 parents 921e831 + cdf3632 commit e4db208

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGES.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616

1717
* Added two new versions of the xcube logo, one for dark and one for light themes,
1818
and replaced the logo in the documentation with the light logo.
19+
20+
### Fixes
21+
22+
* Fix STAC item asset endpoint_url (was incorrectly set to http://localhost:8080/s3;
23+
now correctly parsed from the base URL). (#1178)
1924

2025
* Disabled `compact` mode for JupyterLab Viewer integration. (#1173)
2126

xcube/webapi/ows/stac/controllers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ def _get_assets(ctx: DatasetsContext, base_url: str, dataset_id: str):
900900
"root": "datasets",
901901
"storage_options": {
902902
"anon": True,
903-
"client_kwargs": {"endpoint_url": "http://localhost:8080/s3"},
903+
"client_kwargs": {"endpoint_url": f"{base_url}/s3"},
904904
},
905905
},
906906
"xcube:open_data_params": {"data_id": f"{dataset_id}.zarr"},
@@ -924,7 +924,7 @@ def _get_assets(ctx: DatasetsContext, base_url: str, dataset_id: str):
924924
"root": "pyramids",
925925
"storage_options": {
926926
"anon": True,
927-
"client_kwargs": {"endpoint_url": "http://localhost:8080/s3"},
927+
"client_kwargs": {"endpoint_url": f"{base_url}/s3"},
928928
},
929929
},
930930
"xcube:open_data_params": {"data_id": f"{dataset_id}.levels"},

0 commit comments

Comments
 (0)