Skip to content

Commit c796d5b

Browse files
style: use generator expression in CacheControlMiddleware.any() (#1049)
1 parent ae48c2b commit c796d5b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/titiler/core/titiler/core/middleware.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ async def send_wrapper(message: Message):
5050
scope["method"] in ["HEAD", "GET"]
5151
and message["status"] < self.cachecontrol_max_http_code
5252
and not any(
53-
[
54-
re.match(path, scope["path"])
55-
for path in self.exclude_path
56-
]
53+
re.match(path, scope["path"]) for path in self.exclude_path
5754
)
5855
):
5956
response_headers["Cache-Control"] = self.cachecontrol

0 commit comments

Comments
 (0)