Skip to content

Commit 84fe0f7

Browse files
committed
perf: Log the request path in session validation
1 parent e696c2d commit 84fe0f7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎uiauth/utils.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,20 +158,20 @@ def verify_session(
158158
):
159159
if time.time() < stored["expires_at"]:
160160
logger.CUSTOM_LOGGER.debug(
161-
"Session is valid for host: %s", request.client.host
161+
"Session is valid for host: %s; requesting: %s", request.client.host, request.url.path
162162
)
163163
return
164164
models.ws_session.client_auth.pop(request.client.host, None)
165165
logger.CUSTOM_LOGGER.warning(
166-
"Session expired for host: %s", request.client.host
166+
"Session expired for host: %s; requesting: %s", request.client.host, request.url.path
167167
)
168168
raise models.RedirectException(
169169
source=request.url.path,
170170
destination=enums.APIEndpoints.fastapi_login,
171171
)
172172
elif not session_token:
173173
logger.CUSTOM_LOGGER.warning(
174-
"Session is invalid or expired for host: %s", request.client.host
174+
"Session is invalid or expired for host: %s; requesting: %s", request.client.host, request.url.path
175175
)
176176
raise models.RedirectException(
177177
source=request.url.path,

0 commit comments

Comments
 (0)