Comments (1)
@nikkopante by default, the StacApi will already add a CORSMiddleware
stac-fastapi/stac_fastapi/api/stac_fastapi/api/app.py
Lines 113 to 121 in e376e30
try
from starlette.middleware import Middleware
api = StacApi(
settings=settings,
extensions=extensions,
client=CoreCrudClient(post_request_model=post_request_model), # type: ignore
response_class=ORJSONResponse,
items_get_request_model=items_get_request_model,
search_get_request_model=get_request_model,
search_post_request_model=post_request_model,
middlewares=[
Middleware(
CORSMiddleware,
allow_origins=["*"],
allow_methods=["OPTIONS", "GET"],
allow_headers=["Content-Type", "Authorization"],
),
],
)
from stac-fastapi.
Related Issues (20)
- pin sub-modules (api/extensions) to specific version HOT 4
- Detect disabled extensions in requests HOT 2
- types in `BaseSearchGetRequest`?
- How to tell if search is for single datetime? (Should `str_to_interval` return a single value for that?) HOT 7
- Remove pystac HOT 1
- Authentication and authorization implementation HOT 2
- Ensure Optional `query` Field Defaults to None for Pydantic V2 Compatibility
- move `filter extension` related code out of `types` submodule
- remove FieldsExtension dependency in `stac-fastapi.api` HOT 3
- Filter extension POST request model defaults to cql-json HOT 3
- FilterExtensionGetRequest invalid fields HOT 14
- Remove dependency between Aggregate and Filter extensions HOT 2
- Middleware Stack Rebuilt on Each StacApi Initialization HOT 4
- Custom RequestValidationError Handling Overwritten in stac-fastapi HOT 1
- Invalid RFC3339 datetime HOT 2
- `make_dataclass` erase the `__post_init__` method
- /collections/{collection_id}/items Token Pagination broken in 3.0.0b1, 3.0.0b2 HOT 3
- GET APIRequest attributes and converters HOT 1
- `ApiSettings.api_extension_is_enabled` method doesn't exist! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stac-fastapi.