Skip to content

Commit

Permalink
style: use generator expression in CacheControlMiddleware.any() (#1049)
Browse files Browse the repository at this point in the history
  • Loading branch information
pratapvardhan authored Dec 19, 2024
1 parent ae48c2b commit c796d5b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/titiler/core/titiler/core/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c796d5b

Please sign in to comment.