diff --git a/src/titiler/core/titiler/core/middleware.py b/src/titiler/core/titiler/core/middleware.py index 821d7491..da21ec83 100644 --- a/src/titiler/core/titiler/core/middleware.py +++ b/src/titiler/core/titiler/core/middleware.py @@ -50,10 +50,7 @@ async def send_wrapper(message: Message): scope["method"] in ["HEAD", "GET"] and message["status"] < self.cachecontrol_max_http_code and not any( - [ - re.match(path, scope["path"]) - for path in self.exclude_path - ] + re.match(path, scope["path"]) for path in self.exclude_path ) ): response_headers["Cache-Control"] = self.cachecontrol