Skip to content

Commit

Permalink
perf: 修复 middleware 导致的内存增长
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuler committed Jun 25, 2022
1 parent 052b35e commit fadeeae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/authentication/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class SessionCookieMiddleware(MiddlewareMixin):

@staticmethod
def set_cookie_public_key(request, response):
if request.path.startswith('/api'):
return
pub_key_name = settings.SESSION_RSA_PUBLIC_KEY_NAME
public_key = request.session.get(pub_key_name)
cookie_key = request.COOKIES.get(pub_key_name)
Expand Down

0 comments on commit fadeeae

Please sign in to comment.