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

Adding redirect to /stac/stac when using twitcher #382

Merged
merged 6 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
6 changes: 5 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
[Unreleased](https://github.com/bird-house/birdhouse-deploy/tree/master) (latest)
------------------------------------------------------------------------------------------------------------------

[//]: # (list changes here, using '-' for each new entry, remove this when items are added)
## Fixes

- Fix invalid endpoint redirect for `STAC` when using Twitcher/Magpie.

- Now Apply Magpie permission on `/stac/stac` since the second `/stac` is needed to secure access properly.

[1.31.2](https://github.com/bird-house/birdhouse-deploy/tree/1.31.2) (2023-09-13)
------------------------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
include /etc/nginx/conf.d/cors.include;
}

# Automatically redirect to /stac/stac and exclude redirect when already using /stac
location ~ ^${TWITCHER_PROTECTED_PATH}/stac(?!/stac) {
return 302 ${TWITCHER_PROTECTED_PATH}/stac/stac;
}

location /stac-browser/ {
# STAC API is protected behind Twitcher so we might not need to protect the browser as well.
# In case we encounter a valid use case in which we need to protect the browser, we might
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ providers:

permissions:
- service: stac
resource: /stac
permission: read
group: anonymous
action: create
- service: stac
resource: /stac
permission: write
group: stac-admin
action: create