Skip to content

Commit

Permalink
Streamlined extensions for eoAPI stac component.
Browse files Browse the repository at this point in the history
  • Loading branch information
pantierra committed Dec 13, 2024
1 parent 547ee83 commit 3cc298e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions runtimes/eoapi/stac/eoapi/stac/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,10 @@
),
}

extensions = []
if enabled_extensions := api_settings.extensions:
extensions = [
extensions_map.get(name)
for name in enabled_extensions
if name in extensions_map
]
for extension in (extensions_map.get(name) for name in enabled_extensions):
extensions.append(extension)
else:
extensions = list(extensions_map.values())

Expand Down
4 changes: 2 additions & 2 deletions runtimes/eoapi/stac/eoapi/stac/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class ApiSettings(BaseSettings):

name: str = "eoAPI-stac"
cors_origins: str = "*"
cors_methods: str = "GET,POST,OPTIONS"
cors_methods: str = "GET,POST,PUT,OPTIONS"
cachecontrol: str = "public, max-age=3600"
debug: bool = False

Expand All @@ -23,7 +23,7 @@ class ApiSettings(BaseSettings):
"sort",
"fields",
"pagination",
"titiler",
"bulk_transactions",
"transaction",
]

Expand Down

0 comments on commit 3cc298e

Please sign in to comment.