-
Notifications
You must be signed in to change notification settings - Fork 25
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
CORS not working properly for stac-fastapi with stac-browser #203
Comments
It depends on your stac-fastapi-pgstac version, the CORS configuration by env variable is available just from 3.0.1 https://github.com/stac-utils/stac-fastapi-pgstac/blob/main/CHANGES.md#301---2024-11-14 |
Thanks for your response. I updated the image verison for the docker-compose. All the urls work fine still, but now when I open up http://dns:8085 all I see is the title and white page and it's just loading. No console errors or anything. The stac api endpoint still says cors error in radiant earth's stac-browser. I'm just going to back to using the stac-fastapi-pgstac repo because it was working fine. Maybe I'll try to add the titiler and then stac-browser to that docker-compose.yml. Thanks again for your help. These are beautiful tools. |
I'm also having some problems with the local stac-browser. I'm using stac-fastapi-pgstac:4.0.1 with the cors origin and method env vars.
whenever i try to open the catalog in the local browser i got the CORS header message, but if i use localhost:8081 on radiantearth stac-browser i don't have any problem opening it |
I believe the issue is unrelated to CORS. What I believe is going on is my API url is a domain name, but the links are still getting created as localhost. Stac-browser does does not like the mixing of the two. Is there somewhere in the docker-compose.yml to set the API url? API: https://kygislicserv.ky.gov/kystac-api "links": [ |
Problem description
All the API urls work when I start the containers. I'm even able to access the http://:8081/api.html; however, the STAC-Browser still says I don't have CORS-enabled for 8081.
Expected Output
I added the following to the environment for the fastapi. I removed my ec2 dns
Environment Information
EC2 - AMI Amazon Linux 2023
Docker
The text was updated successfully, but these errors were encountered: