File tree Expand file tree Collapse file tree 5 files changed +6
-11
lines changed Expand file tree Collapse file tree 5 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 11import uvicorn
22from uvicorn .config import LOGGING_CONFIG
33
4-
54LOGGING_CONFIG ["loggers" ][__package__ ] = {
65 "level" : "DEBUG" ,
76 "handlers" : ["default" ],
Original file line number Diff line number Diff line change 99from fastapi import Depends , FastAPI
1010from fastapi .security import OpenIdConnect
1111
12- from .proxy import ReverseProxy
1312from .config import Settings
14- from .middleware import AddProcessTimeHeaderMiddleware
1513from .handlers import OpenApiSpecHandler
14+ from .middleware import AddProcessTimeHeaderMiddleware
15+ from .proxy import ReverseProxy
1616
1717
1818def create_app (settings : Optional [Settings ] = None ) -> FastAPI :
Original file line number Diff line number Diff line change 1- from dataclasses import dataclass
21import logging
2+ from dataclasses import dataclass
33
44from fastapi import Request , Response
55from fastapi .routing import APIRoute
@@ -17,8 +17,7 @@ class OpenApiSpecHandler:
1717 auth_scheme_name : str = "oidcAuth"
1818
1919 async def dispatch (self , req : Request , res : Response ):
20- """
21- Proxy the OpenAPI spec from the upstream STAC API, updating it with OIDC security
20+ """Proxy the OpenAPI spec from the upstream STAC API, updating it with OIDC security
2221 requirements.
2322 """
2423 oidc_spec_response = await self .proxy .proxy_request (req )
Original file line number Diff line number Diff line change 44
55import httpx
66from fastapi import Request
7+ from starlette .background import BackgroundTask
78from starlette .datastructures import MutableHeaders
89from starlette .responses import StreamingResponse
9- from starlette .background import BackgroundTask
10-
1110
1211logger = logging .getLogger (__name__ )
1312
Original file line number Diff line number Diff line change 22
33
44def safe_headers (headers : Headers ) -> dict [str , str ]:
5- """
6- Scrub headers that should not be proxied to the client.
7- """
5+ """Scrub headers that should not be proxied to the client."""
86 excluded_headers = [
97 "content-length" ,
108 "content-encoding" ,
You can’t perform that action at this time.
0 commit comments