File tree Expand file tree Collapse file tree 3 files changed +21
-11
lines changed Expand file tree Collapse file tree 3 files changed +21
-11
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,10 @@ The application is configurable via environment variables.
77
77
- ** Type:** boolean
78
78
- ** Required:** No, defaults to ` true `
79
79
- ** Example:** ` false ` , ` 1 ` , ` True `
80
+ - ** ` ENABLE_COMPRESSION ` ** , enable response compression
81
+ - ** Type:** boolean
82
+ - ** Required:** No, defaults to ` true `
83
+ - ** Example:** ` false ` , ` 1 ` , ` True `
80
84
- ** ` HEALTHZ_PREFIX ` ** , path prefix for health check endpoints
81
85
- ** Type:** string
82
86
- ** Required:** No, defaults to ` /healthz `
@@ -117,6 +121,10 @@ The application is configurable via environment variables.
117
121
"^/healthz" : [" GET" ]
118
122
}
119
123
```
124
+ - **`ENABLE_AUTHENTICATION_EXTENSION`**, enable authentication extension in STAC API responses
125
+ - **Type:** boolean
126
+ - **Required:** No, defaults to `true`
127
+ - **Example:** `false`, `1`, `True`
120
128
- **`OPENAPI_SPEC_ENDPOINT`**, path of OpenAPI specification, used for augmenting spec response with auth configuration
121
129
- **Type:** string or null
122
130
- **Required:** No, defaults to `null` (disabled)
Original file line number Diff line number Diff line change @@ -87,12 +87,13 @@ async def lifespan(app: FastAPI):
87
87
#
88
88
# Middleware (order is important, last added = first to run)
89
89
#
90
- app .add_middleware (
91
- AuthenticationExtensionMiddleware ,
92
- default_public = settings .default_public ,
93
- public_endpoints = settings .public_endpoints ,
94
- private_endpoints = settings .private_endpoints ,
95
- )
90
+ if settings .enable_authentication_extension :
91
+ app .add_middleware (
92
+ AuthenticationExtensionMiddleware ,
93
+ default_public = settings .default_public ,
94
+ public_endpoints = settings .public_endpoints ,
95
+ private_endpoints = settings .private_endpoints ,
96
+ )
96
97
97
98
if settings .openapi_spec_endpoint :
98
99
app .add_middleware (
@@ -113,9 +114,10 @@ async def lifespan(app: FastAPI):
113
114
items_filter = settings .items_filter (),
114
115
)
115
116
116
- app .add_middleware (
117
- CompressionMiddleware ,
118
- )
117
+ if settings .enable_compression :
118
+ app .add_middleware (
119
+ CompressionMiddleware ,
120
+ )
119
121
120
122
app .add_middleware (
121
123
AddProcessTimeHeaderMiddleware ,
Original file line number Diff line number Diff line change @@ -40,8 +40,8 @@ class Settings(BaseSettings):
40
40
41
41
wait_for_upstream : bool = True
42
42
check_conformance : bool = True
43
-
44
- # Endpoints
43
+ enable_compression : bool = True
44
+ enable_authentication_extension : bool = True
45
45
healthz_prefix : str = Field (pattern = _PREFIX_PATTERN , default = "/healthz" )
46
46
openapi_spec_endpoint : Optional [str ] = Field (pattern = _PREFIX_PATTERN , default = None )
47
47
You can’t perform that action at this time.
0 commit comments