We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
/search
root_path
This is on main branch.
main
When App is configured with a prefix, in our case /stac
/stac
app = FastAPI(root_path="/stac", lifespan=lifespan)
and we use search in POST mode with something like this:
POST
DATA='{"datetime":"2021-01-01T00:00:00Z/2021-02-28T23:59:59Z","collections":["agera5"]}' curl -v -s \ -H 'Origin: https://somesite.org' \ -H 'Content-Type: application/json' \ -X POST -d "$DATA" \ "https://XXXX.lambda-url.eu-central-1.on.aws/stac/search" | tee response.json | jq '.links'
Links for next and self returned from that endpoint are missing configured root_path prefix.
next
self
"links:" [ { "rel": "next", "type": "application/geo+json", "method": "POST", "href": "https://XXXX.lambda-url.eu-central-1.on.aws/search", "body": { "datetime": "2021-01-01T00:00:00Z/2021-02-28T23:59:59Z", "collections": [ "agera5" ], "token": "next:agera5:agera5-20210219" } }, { "rel": "root", "type": "application/json", "href": "https://XXXX.lambda-url.eu-central-1.on.aws/stac/" }, { "rel": "self", "type": "application/json", "href": "https://XXXX.lambda-url.eu-central-1.on.aws/search" } ]
Note that root link is correct in the response above, so configuration is being picked up.
root
My guess that error is here:
stac-fastapi-pgstac/stac_fastapi/pgstac/models/links.py
Lines 141 to 148 in df4c12a
Raw request.url is used without calling self.resolve(..) to patch it for external view of the API endpoint.
request.url
self.resolve(..)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is on
main
branch.When App is configured with a prefix, in our case
/stac
and we use search in
POST
mode with something like this:Links for
next
andself
returned from that endpoint are missing configuredroot_path
prefix.Note that
root
link is correct in the response above, so configuration is being picked up.My guess that error is here:
stac-fastapi-pgstac/stac_fastapi/pgstac/models/links.py
Lines 141 to 148 in df4c12a
Raw
request.url
is used without callingself.resolve(..)
to patch it for external view of the API endpoint.The text was updated successfully, but these errors were encountered: