token-as-var
This commit is contained in:
@@ -32,7 +32,10 @@ async fn connect_handler(
|
||||
Some(val) => val.to_str().unwrap_or("").split(" ").last().unwrap_or(""),
|
||||
None => match req.match_info().get("token") {
|
||||
Some(val) => val,
|
||||
None => return Err(ErrorUnauthorized("Unauthorized")),
|
||||
None => match req.query_string().split('=').last() {
|
||||
Some(val) => val,
|
||||
None => return Err(ErrorUnauthorized("Unauthorized")),
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user