Skip to content

Commit

Permalink
Merge pull request #2796 from OpSecId/pstlouis/change-validation-midd…
Browse files Browse the repository at this point in the history
…leware-order
  • Loading branch information
swcurran committed Feb 19, 2024
2 parents 75e35c1 + 3f81e24 commit adc5c67
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion aries_cloudagent/admin/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def _matches_additional_routes(self, path: str) -> bool:
async def make_application(self) -> web.Application:
"""Get the aiohttp application instance."""

middlewares = [ready_middleware, debug_middleware, validation_middleware]
middlewares = [ready_middleware, debug_middleware]

# admin-token and admin-token are mutually exclusive and required.
# This should be enforced during parameter parsing but to be sure,
Expand Down Expand Up @@ -453,6 +453,9 @@ async def setup_context(request: web.Request, handler):

middlewares.append(setup_context)

# Register validation_middleware last avoiding unauthorized validations
middlewares.append(validation_middleware)

app = web.Application(
middlewares=middlewares,
client_max_size=(
Expand Down

0 comments on commit adc5c67

Please sign in to comment.