Skip to content

Module titiler.core.middleware

Titiler middlewares.

Classes

CacheControlMiddleware

class CacheControlMiddleware(
    app: Callable[[MutableMapping[str, Any], Callable[[], Awaitable[MutableMapping[str, Any]]], Callable[[MutableMapping[str, Any]], Awaitable[NoneType]]], Awaitable[NoneType]],
    cachecontrol: Union[str, NoneType] = None,
    cachecontrol_max_http_code: Union[int, NoneType] = 500,
    exclude_path: Union[Set[str], NoneType] = None
)

MiddleWare to add CacheControl in response headers.

LoggerMiddleware

class LoggerMiddleware(
    app: Callable[[MutableMapping[str, Any], Callable[[], Awaitable[MutableMapping[str, Any]]], Callable[[MutableMapping[str, Any]], Awaitable[NoneType]]], Awaitable[NoneType]],
    querystrings: bool = False,
    headers: bool = False
)

MiddleWare to add logging.

LowerCaseQueryStringMiddleware

class LowerCaseQueryStringMiddleware(
    app: Callable[[MutableMapping[str, Any], Callable[[], Awaitable[MutableMapping[str, Any]]], Callable[[MutableMapping[str, Any]], Awaitable[NoneType]]], Awaitable[NoneType]]
)

Middleware to make URL parameters case-insensitive.

taken from: tiangolo/fastapi#826

TotalTimeMiddleware

class TotalTimeMiddleware(
    app: Callable[[MutableMapping[str, Any], Callable[[], Awaitable[MutableMapping[str, Any]]], Callable[[MutableMapping[str, Any]], Awaitable[NoneType]]], Awaitable[NoneType]]
)

MiddleWare to add Total process time in response headers.