Skip to content

middleware

titiler.core.middleware

Titiler middlewares.

CacheControlMiddleware dataclass

MiddleWare to add CacheControl in response headers.

Parameters:

  • app (ASGIApp) –

    starlette/FastAPI application.

  • cachecontrol (str, default: None ) –

    Cache-Control string to add to the response.

  • exclude_path (set, default: set() ) –

    Set of regex expression to use to filter the path.

__call__ async

__call__(scope: Scope, receive: Receive, send: Send)

Handle call.

LoggerMiddleware dataclass

MiddleWare to add logging.

__call__ async

__call__(scope: Scope, receive: Receive, send: Send)

Handle call.

LowerCaseQueryStringMiddleware dataclass

Middleware to make URL parameters case-insensitive. taken from: tiangolo/fastapi#826

__call__ async

__call__(scope: Scope, receive: Receive, send: Send)

Handle call.

TotalTimeMiddleware dataclass

MiddleWare to add Total process time in response headers.

Parameters:

  • app (ASGIApp) –

    starlette/FastAPI application.

__call__ async

__call__(scope: Scope, receive: Receive, send: Send)

Handle call.