debug: log cookie presence in push token handler

Author: Aaron Steven White
Commit 90ef9d9c89d2478bb2840b6e05990093a0461802
Parent: 6b408bbc3c
Structural diff unavailable

These commits were pushed via plain git push, so no pre-parsed schemas are available. Install git-remote-cospan and re-push via panproto:// to see scope-level changes, breaking change detection, and semantic diffs.

brew install panproto/tap/git-remote-cospan
1 file changed +7 -0
@@ -48,6 +48,13 @@ pub async fn handler(
4848     headers: HeaderMap,
4949 ) -> Result<Json<serde_json::Value>, AppError> {
5050     // 1. Require an authenticated session.
51+    let has_cookie = headers.get("cookie").is_some();
52+    let cookie_preview = headers
53+        .get("cookie")
54+        .and_then(|v| v.to_str().ok())
55+        .map(|s| if s.len() > 40 { format!("{}...", &s[..40]) } else { s.to_string() })
56+        .unwrap_or_default();
57+    tracing::info!(has_cookie, cookie_preview, "createPushToken auth check");
5158     let session_id = extract_session_id(&headers)
5259         .ok_or_else(|| AppError::Unauthorized("sign in required".to_string()))?;
5360     let session = state
cospan · schematic version control on atproto built on AT Protocol