Skip to content

Commit 3171999

Browse files
committed
docs: fix middleware formatting
1 parent 2d15512 commit 3171999

File tree

2 files changed

+41
-37
lines changed

2 files changed

+41
-37
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: help test test-coverage test-fast lint format clean install dev-install
1+
.PHONY: help test test-coverage test-fast lint format clean install dev-install docs
22

33
help: ## Show this help message
44
@echo "Available commands:"
@@ -71,3 +71,7 @@ ci: ## Run CI checks locally
7171
--cov-fail-under=85 \
7272
-v
7373
@echo "✅ CI checks completed!"
74+
75+
docs: ## Serve documentation locally
76+
uv sync --extra docs
77+
DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib uv run mkdocs serve

docs/architecture/middleware-stack.md

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -8,59 +8,59 @@ Aside from the actual communication with the upstream STAC API, the majority of
88
> [!IMPORTANT]
99
> The order of middleware execution is **critical**. For example, `RemoveRootPathMiddleware` must run before `EnforceAuthMiddleware` so that authentication decisions are made on the correct path after root path removal.
1010
11-
1. **[`CompressionMiddleware`][starlette_cramjam.middleware.CompressionMiddleware]**
11+
1. **[`CompressionMiddleware`](https://github.com/developmentseed/starlette-cramjam)**
1212

13-
- Handles response compression when [`ENABLE_COMPRESSION`](configuration.md#enable_compression) is enabled
14-
- Reduces response size for better performance
13+
- Handles response compression when [`ENABLE_COMPRESSION`](configuration.md#enable_compression) is enabled
14+
- Reduces response size for better performance
1515

16-
2. **[`RemoveRootPathMiddleware`][stac_auth_proxy.middleware.RemoveRootPathMiddleware]**
16+
2. **[`RemoveRootPathMiddleware`][stac_auth_proxy.middleware.RemoveRootPathMiddleware]**
1717

18-
- Removes the application root path from incoming requests
19-
- Ensures requests are properly routed to upstream API
20-
- Only active if [`ROOT_PATH`](configuration.md#root_path) is configured
18+
- Removes the application root path from incoming requests
19+
- Ensures requests are properly routed to upstream API
20+
- Only active if [`ROOT_PATH`](configuration.md#root_path) is configured
2121

22-
3. **[`ProcessLinksMiddleware`][stac_auth_proxy.middleware.ProcessLinksMiddleware]**
22+
3. **[`ProcessLinksMiddleware`][stac_auth_proxy.middleware.ProcessLinksMiddleware]**
2323

24-
- Updates links in JSON responses to handle root path and upstream URL path differences
25-
- Removes upstream URL path from links and adds root path if configured
26-
- Only active if [`ROOT_PATH`](configuration.md#root_path) is set or `upstream_url.path != "/"`
24+
- Updates links in JSON responses to handle root path and upstream URL path differences
25+
- Removes upstream URL path from links and adds root path if configured
26+
- Only active if [`ROOT_PATH`](configuration.md#root_path) is set or `upstream_url.path != "/"`
2727

28-
4. **[`EnforceAuthMiddleware`][stac_auth_proxy.middleware.EnforceAuthMiddleware]**
28+
4. **[`EnforceAuthMiddleware`][stac_auth_proxy.middleware.EnforceAuthMiddleware]**
2929

30-
- Handles authentication and authorization
31-
- Configurable public/private endpoints via [`PUBLIC_ENDPOINTS`](configuration.md#public_endpoints) and [`PRIVATE_ENDPOINTS`](configuration.md#private_endpoints)
32-
- OIDC integration via [`OIDC_DISCOVERY_INTERNAL_URL`](configuration.md#oidc_discovery_internal_url)
33-
- JWT audience validation via [`ALLOWED_JWT_AUDIENCES`](configuration.md#allowed_jwt_audiences)
34-
- Places auth token payload in request state
30+
- Handles authentication and authorization
31+
- Configurable public/private endpoints via [`PUBLIC_ENDPOINTS`](configuration.md#public_endpoints) and [`PRIVATE_ENDPOINTS`](configuration.md#private_endpoints)
32+
- OIDC integration via [`OIDC_DISCOVERY_INTERNAL_URL`](configuration.md#oidc_discovery_internal_url)
33+
- JWT audience validation via [`ALLOWED_JWT_AUDIENCES`](configuration.md#allowed_jwt_audiences)
34+
- Places auth token payload in request state
3535

36-
5. **[`AddProcessTimeHeaderMiddleware`][stac_auth_proxy.middleware.AddProcessTimeHeaderMiddleware]**
36+
5. **[`AddProcessTimeHeaderMiddleware`][stac_auth_proxy.middleware.AddProcessTimeHeaderMiddleware]**
3737

38-
- Adds processing time headers to responses
39-
- Useful for monitoring and debugging
38+
- Adds processing time headers to responses
39+
- Useful for monitoring and debugging
4040

41-
6. **[`Cql2BuildFilterMiddleware`][stac_auth_proxy.middleware.Cql2BuildFilterMiddleware]**
41+
6. **[`Cql2BuildFilterMiddleware`][stac_auth_proxy.middleware.Cql2BuildFilterMiddleware]**
4242

43-
- Builds CQL2 filters based on request context/state
44-
- Places [CQL2 expression](http://developmentseed.org/cql2-rs/latest/python/#cql2.Expr) in request state
45-
- Only active if [`ITEMS_FILTER_CLS`](configuration.md#items_filter_cls) or [`COLLECTIONS_FILTER_CLS`](configuration.md#collections_filter_cls) is configured
43+
- Builds CQL2 filters based on request context/state
44+
- Places [CQL2 expression](http://developmentseed.org/cql2-rs/latest/python/#cql2.Expr) in request state
45+
- Only active if [`ITEMS_FILTER_CLS`](configuration.md#items_filter_cls) or [`COLLECTIONS_FILTER_CLS`](configuration.md#collections_filter_cls) is configured
4646

47-
7. **[`Cql2RewriteLinksFilterMiddleware`][stac_auth_proxy.middleware.Cql2RewriteLinksFilterMiddleware]**
47+
7. **[`Cql2RewriteLinksFilterMiddleware`][stac_auth_proxy.middleware.Cql2RewriteLinksFilterMiddleware]**
4848

49-
- Rewrites filter parameters in response links to remove applied filters
50-
- Ensures links in responses show the original filter state
51-
- Only active if filtering is enabled (see [`ITEMS_FILTER_CLS`](configuration.md#items_filter_cls) or [`COLLECTIONS_FILTER_CLS`](configuration.md#collections_filter_cls))
49+
- Rewrites filter parameters in response links to remove applied filters
50+
- Ensures links in responses show the original filter state
51+
- Only active if filtering is enabled (see [`ITEMS_FILTER_CLS`](configuration.md#items_filter_cls) or [`COLLECTIONS_FILTER_CLS`](configuration.md#collections_filter_cls))
5252

53-
8. **[`Cql2ApplyFilterQueryStringMiddleware`][stac_auth_proxy.middleware.Cql2ApplyFilterQueryStringMiddleware]**
53+
8. **[`Cql2ApplyFilterQueryStringMiddleware`][stac_auth_proxy.middleware.Cql2ApplyFilterQueryStringMiddleware]**
5454

55-
- Retrieves [CQL2 expression](http://developmentseed.org/cql2-rs/latest/python/#cql2.Expr) from request state
56-
- Augments `GET` requests with CQL2 filter by appending to querystring
57-
- Only active if filtering is enabled (see [`ITEMS_FILTER_CLS`](configuration.md#items_filter_cls) or [`COLLECTIONS_FILTER_CLS`](configuration.md#collections_filter_cls))
55+
- Retrieves [CQL2 expression](http://developmentseed.org/cql2-rs/latest/python/#cql2.Expr) from request state
56+
- Augments `GET` requests with CQL2 filter by appending to querystring
57+
- Only active if filtering is enabled (see [`ITEMS_FILTER_CLS`](configuration.md#items_filter_cls) or [`COLLECTIONS_FILTER_CLS`](configuration.md#collections_filter_cls))
5858

59-
9. **[`Cql2ApplyFilterBodyMiddleware`][stac_auth_proxy.middleware.Cql2ApplyFilterBodyMiddleware]**
59+
9. **[`Cql2ApplyFilterBodyMiddleware`][stac_auth_proxy.middleware.Cql2ApplyFilterBodyMiddleware]**
6060

61-
- Retrieves [CQL2 expression](http://developmentseed.org/cql2-rs/latest/python/#cql2.Expr) from request state
62-
- Augments `POST`/`PUT`/`PATCH` requests with CQL2 filter by modifying body
63-
- Only active if filtering is enabled (see [`ITEMS_FILTER_CLS`](configuration.md#items_filter_cls) or [`COLLECTIONS_FILTER_CLS`](configuration.md#collections_filter_cls))
61+
- Retrieves [CQL2 expression](http://developmentseed.org/cql2-rs/latest/python/#cql2.Expr) from request state
62+
- Augments `POST`/`PUT`/`PATCH` requests with CQL2 filter by modifying body
63+
- Only active if filtering is enabled (see [`ITEMS_FILTER_CLS`](configuration.md#items_filter_cls) or [`COLLECTIONS_FILTER_CLS`](configuration.md#collections_filter_cls))
6464

6565
10. **[`Cql2ValidateResponseBodyMiddleware`][stac_auth_proxy.middleware.Cql2ValidateResponseBodyMiddleware]**
6666

0 commit comments

Comments
 (0)