Skip to content

Commit 2ee64cc

Browse files
authored
fix: changelog and fastapi middleware (#491)
1 parent 718cf79 commit 2ee64cc

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
## [0.18.11] - 2024-04-26
1212

13-
- Fixes session issues with django-rest-framework.
13+
- Fixes issues with the propagation of session creation/updates with django-rest-framework because the django-rest-framework wrapped the original request with it's own request object. Updates on that object were not reflecting on the original request object.
14+
- Fixes type mismatch for FastAPI middleware.
1415

1516
## [0.18.10] - 2024-04-05
1617

supertokens_python/framework/fastapi/fastapi_middleware.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,14 @@
1818
from supertokens_python.framework import BaseResponse
1919

2020
if TYPE_CHECKING:
21-
from fastapi import FastAPI, Request
21+
from fastapi import Request
2222

2323

2424
def get_middleware():
2525
from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint
2626
from supertokens_python.utils import default_user_context
2727

2828
class Middleware(BaseHTTPMiddleware):
29-
def __init__(self, app: FastAPI):
30-
super().__init__(app)
31-
3229
async def dispatch(self, request: Request, call_next: RequestResponseEndpoint):
3330
from supertokens_python import Supertokens
3431
from supertokens_python.exceptions import SuperTokensError

0 commit comments

Comments
 (0)