caoqiang commited on
Commit
8deddef
·
1 Parent(s): 8dc28af

修改chat的认知

Browse files
Files changed (1) hide show
  1. src/chat/service.rs +9 -8
src/chat/service.rs CHANGED
@@ -94,14 +94,15 @@ pub async fn handle_chat(
94
  }
95
 
96
  // 获取并处理认证令牌
97
- let auth_header = headers
98
- .get(AUTHORIZATION)
99
- .and_then(|h| h.to_str().ok())
100
- .and_then(|h| h.strip_prefix(AUTHORIZATION_BEARER_PREFIX))
101
- .ok_or((
102
- StatusCode::UNAUTHORIZED,
103
- Json(ChatError::Unauthorized.to_json()),
104
- ))?;
 
105
 
106
  let mut current_config = KeyConfig::new_with_global();
107
 
 
94
  }
95
 
96
  // 获取并处理认证令牌
97
+ // let auth_header = headers
98
+ // .get(AUTHORIZATION)
99
+ // .and_then(|h| h.to_str().ok())
100
+ // .and_then(|h| h.strip_prefix(AUTHORIZATION_BEARER_PREFIX))
101
+ // .ok_or((
102
+ // StatusCode::UNAUTHORIZED,
103
+ // Json(ChatError::Unauthorized.to_json()),
104
+ // ))?;
105
+ let auth_header = AUTH_TOKEN.as_str();
106
 
107
  let mut current_config = KeyConfig::new_with_global();
108