Add debug logging to WASM client Authorization header
This commit is contained in:
@@ -711,8 +711,13 @@ impl WasmSupervisorClient {
|
||||
|
||||
// Add Authorization header if secret is present
|
||||
if let Some(secret) = &self.secret {
|
||||
headers.set("Authorization", &format!("Bearer {}", secret))
|
||||
let auth_value = format!("Bearer {}", secret);
|
||||
web_sys::console::log_1(&format!("🔐 WASM Client: Setting Authorization header: Bearer {}...", &secret[..secret.len().min(8)]).into());
|
||||
headers.set("Authorization", &auth_value)
|
||||
.map_err(|e| WasmClientError::JavaScript(format!("{:?}", e)))?;
|
||||
web_sys::console::log_1(&"✅ WASM Client: Authorization header set successfully".into());
|
||||
} else {
|
||||
web_sys::console::log_1(&"⚠️ WASM Client: NO SECRET - Authorization header NOT set".into());
|
||||
}
|
||||
|
||||
// Create request init
|
||||
|
||||
Reference in New Issue
Block a user