Skip to content

Commit

Permalink
Middleware revision
Browse files Browse the repository at this point in the history
  • Loading branch information
na-stewart committed Nov 22, 2024
1 parent c1bdc58 commit 1b02f66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "sanic-security"
version = "1.14.0"
version = "1.14.1"
requires-python = ">=3.8"
dependencies = [
"tortoise-orm>=0.17.0",
Expand Down
2 changes: 1 addition & 1 deletion sanic_security/authentication.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ def initialize_security(app: Sanic, create_root=True) -> None:
async def response_handler_middleware(request, response):
if hasattr(request.ctx, "session"):
secure_headers.set_headers(response)
if request.ctx.session.is_refresh:
if hasattr(request.ctx.session, "is_refresh") and request.ctx.session.is_refresh:
request.ctx.session.encode(response)

@app.listener("before_server_start")
Expand Down

0 comments on commit 1b02f66

Please sign in to comment.