Skip to content

Commit

Permalink
still 7, removed leftovers from mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
euri10 committed Mar 4, 2025
1 parent d73cb6e commit b273c67
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions litestar/_asgi/routing_trie/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,20 +202,7 @@ def build_route_middleware_stack(
if not has_middleware:
pass
else:
from litestar.middleware.allowed_hosts import AllowedHostsMiddleware
from litestar.middleware.response_cache import ResponseCacheMiddleware

# maybe test on ASGIMiddleware subclass here ?
if type(middleware) in [
# CSRFMiddleware,
# CompressionMiddleware,
# ResponseCacheMiddleware,
AllowedHostsMiddleware,
# LoggingMiddleware,
]:
asgi_handler = partial(type(middleware)(config=middleware.config).handle, next_app=asgi_handler)
else:
asgi_handler = middleware(asgi_handler)
asgi_handler = middleware(asgi_handler)
if has_cached_route:
from litestar.middleware.response_cache import ResponseCacheMiddleware

Expand Down

0 comments on commit b273c67

Please sign in to comment.